色彩對比分析程式
Tuesday, August 16th, 2005在 jedi 的 blog 看到色彩對比分析程式的介紹 Colour Contrast Analyser 1.0,裡面也提到 w3c 的色彩對比的驗證
首先是根據 YIQ 的公式算出亮度(brightness)
I = 0.299 R + 0.587 G + 0.114 B
再定義 color difference
D = max(R1,R2) - min(R1,R2) +
max(G1,G2) - min(G1,G2) +
max(B1,B2) - min(B1,B2)
上面提到
The range for color brightness difference is 125.
The range for color difference is 500.
不過 HP 提出的方法是用 400 為底限