URI: http://www.j-a-b.net/web/hue/code-transformation
last updated: 2009-12-04
© 2002-2009 Contact
At times one might want to transform one colour coding into another one. While the relationship between short and long hexadecimal codings is quite obvious as is their relation to absolute RGB values, a transformation to relative values is more complicated. Especially calculation of HSL values from RGB values or vice versa can only be done using some longer and complicated algorithm, and RGB or HSL values of colour names could only be guessed or looked up in a chart.
The following interface allows you to obtain the corresponding values of any valid input (see examples for valid colour ranges). However, due to mathematical rounding some calculated colours might be slightly different from the original colour. The right column shows the appearance of each calculated colour value for comparison.
As of today, HSL values are only rendered in browsers using the Gecko engine (Mozilla 1.6, Firebird 0.7, Firefox 0.8, K-Meleon 0.82) thus the corresponding colour field is left blank in browsers like Internet Explorer or Opera.
The input format of the values can be seen in the examples below. You should neither use the octothorpe (#), nor the keyword rgb, parenthesis or the percent character (%). Input values are case-insensitive.