Does hue/sat/lum offer a smaller range of colors than RGB?

All values of RGB should be unique and distinguishable, meaning there are truly 256*256*256 colors.

In HSL, however, if L=0 then H and S can be anything, but you still get the same color (black). Similarly, if S=0 then H doesn't matter, as you'll get some shade of pure grey. So it seems that the HSL model offers at best 256*256*256 - 256*256 - 256 colors, or ~0.4% less colors. Is this true?

• The gamuts may be different (I don't know), but HSL and HSV were developed as polar transformations of RGB. However, your thoughts about "S=0, H doesn't matter" strikes me as wrong in a way I can't articulate. S=0 is another way of saying R=G=B. L=0 becomes (R=G=B=0), and L=1 (100%) = (R=G=B=1). I am curious about the answer. – horatio Dec 13 '13 at 21:06
• @horatio For example, when R=G=B=128, H=0, S=0, L=50, when R=G=B=255, H=0, S=0, L=100... – John Dec 14 '13 at 13:36
• That is pretty much what I said in my comment. The two answers confirm my statement about them being an isomorphism of the RGB color space with limitations on "pickability" imposed by the integer ranges imposed by most software. – horatio Dec 17 '13 at 15:06

Yes and no.

Yes:

It offers a smaller range of colors assuming that integers are required for each value. Photoshop, for example, requires HSB values to be integer and will yell at you if you try otherwise: However, your math seems to be off. You're on the right track with RGB: each value can be an integer from 0-255, so the RGB gamut consists of 256³ or 16,581,375 colors.

For HSL, the value constraints are different. H can be 0-359, S can be 0-100, and B can be 0-100. So the number of unique HSL triplets is 360*101*101, or 3,672,360. This does not yet take into account duplicate colors and we're already significantly smaller than RGB.

I am not good enough at statistics to calculate the number of unique values for integer-based HSL, so I won't even try

As a result, there is going to be color collision. You can try this yourself by checking the value of two very close RGB values. For example, #00AAAA and #00AAAB are both converted to 180°, 100%, 67% in Photoshop: No:

Illustrator is a bit more laid back. It is happy and willing to accept decimal values for HSB: CSS3 also accepts decimal values for hsl() and hsla(). This implementation makes it way more granular than RGB, which should never accept decimal values.

• Very well put, thank you. I didn't realize the ranges were different. – 1279343 Dec 14 '13 at 1:25

HSL (hue, saturation, lightness) and HSB are derivative color models of the RGB color model. They cover the same range (as in gamut) of colors with a smaller amount of "distinctive" points in between.

The RGB model defines 256^3 or 16,777,216 points
and HSL/HSB define 360*101*101 or 3,672,360 points.

You would have to find out programmatically how many points from HSL map to unique points of RGB. Not only the extreme points you mention map to a single set of RGB values. For example, there are also many dublicates for a saturation value of 1% (in HSL) as you can check here.

That's the theory. In practice still most devices are not capable of processing/presenting 16.777.216 "unique and distinguishable" colors and the human eye can't as well. So in practice the difference of the amount of "distinctive" values often (not always) doesn't matter.

• excellent additional information. – 1279343 Dec 14 '13 at 20:29