- From: David Woolley <david@djwhome.demon.co.uk>
- Date: Thu, 27 Feb 2003 21:23:08 +0000 (GMT)
- To: www-style@w3.org
> If R, G and B can have values from 0.0% to 100.0% percent, then why is A, > alpha, so limited within the bounds of 0.0 to 1.0, equivanlent to 0% to 100% As already indicated, there are uncountably infinite possible values, as it is a real number. I think the reasons for the differences are historical. The values for R, G, and B were adapted from the deprecated HTML attributes for colour and these were invented by people commercialising HTML for an unsophisticated market, and used values that were probably in the API they used and reflect hardware engineering considerations. Alpha has come from a more sophisticated graphics tradition, which is not tied to DAC register sizes. You will also find that colours in PostScript are in the inteval [0, 1]. The % values are probably an attempt to regain normalised colours, allowing that the simple [0,1] range was taken. The other anomaly that arises from the coding of R, G, B is that they really represent the values that produce the appropriate subjective colour on an uncompensated CRT based display (the specification has now been idealised to assume an ideal gamma 2.2 transfer function, rather than a real life one). A linear scale would have been more rational from the point of view of combining (e.g. you have to un-gamma before applying transparency and re-gamma afterwards), and something like the transfer function used on Apple's more sensible from a human engineering point of view.
Received on Thursday, 27 February 2003 16:35:03 UTC