Sign in to follow this  
AndyTang

HSL Colour Wheel

Recommended Posts

AndyTang    122
Does anyone know how to program a colour wheel with the triangle pointer for HSL values? I don't really understand how you can fit all the colours from a rectangle SL to a triangle SL.

Share this post


Link to post
Share on other sites
Inmate2993    222
I probably can't explain it in terms of the math involved, but I can give you a good asbtraction about it.

See, at 0.0 Luminance, any hue and saturation yields black. Likewise, at 1.0 Luminance, any hue and saturation yields white. So, if you think about the color space as a sphere, with black at the bottom, white at the top, and solid hues on the circumferense, with gray at the center, this'll put you in a good mind frame.

An SL triangle puts each vertex at either the Black, the White, or the Hue. Logically, the Saturation along the BW segment is 0.0, with the Luminance sliding from 0.0 to 1.0 between the two points. The Hue vertex would have a 1.0 Saturation, with 0.5 Luminance. The HB segment slides from 0.5 Lum to 0.0 Lum, and slides 1.0 Sat to 0.0 Sat. The HW segment slides 0.5 Lum to 1.0 Lum, and 1.0 to 0.0 Sat.

Now, if you remember that Sphere I mentioned before. Imagine this SL triangle as a half circle with the line segment as the verticle between white and black. This is how it covers the colors a square does.

Sorry I can't spell out the exact algorythms involved, but I just don't know them. Hope this theory helps.

Share this post


Link to post
Share on other sites
AndyTang    122
I found the source of my problem - its the values outside of a triangle visually.
Say at Luminance of 75% and a Saturation of 75%, this would lie comfortably in a LS square, but seemingly outside of a LS triangle.

At first I though the sides were compressed from the square into a triangle but that would of course leave one side as white (100% luminance) and the other side black (0% luminance) which isn't right is it?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this