As I understand it HSL and HSB colour spaces are very similar, both use the same 0-360 colour wheel for hue and the same 0-1 value for saturation. The one difference between them is that in the HSB model you have brightness, where 0 is black and 1 is the colour at full intensity, while in HSL you have lightness/luminosity, where 0 is still black but 1 is white.
The .net Color
struct uses the RGB space, but has GetHue()
, GetSaturation()
and GetBrightness()
functions.
The documentation here is confusing. For GetBrightness()
:
/// <summary>Gets the hue-saturation-brightness (HSB) brightness value for this
/// System.Drawing.Color structure.</summary>
Ok, so makes sense, .Net appears to be using HSB...
/// <returns>The brightness of this System.Drawing.Color. The brightness ranges
/// from 0.0 through 1.0, where 0.0 represents black and 1.0 represents white.
/// </returns>
Er... so the max value represents white, rather than the brightest colour. Despite the fact that their documents and naming consistently refers to brightness I'm pretty sure that the value returned is actually lightness/luminosity, i.e. .Net actually uses the HSL model and not HSB.
Can anyone confirm this? Is it an error in the documentation, an error in GetBrightness()
, or am I misunderstanding the theory somehow?