Wednesday, June 1, 2011

Math behind colorspace conversions, RGB-HSL

Math behind colorspace conversions, RGB-HSL:
In this article I will try to explain the math behind converting RGB values to HSL and back.
RGB is a way to describe a color in a cube, where Red, Green and Blue are on the different axis.
197px-RGB_Cube_Show_lowgamma_cutout_a
HSL is another way to describe a color. Here we use Hue (the angle on the color wheel), Saturation (the amount of color/chroma) and Lightness (how bright the color is).
197px-HSL_color_solid_cylinder_alpha_lowgamma

More...
Post a Comment