Cubes, cones, and color: Cutting through the RGB and HSV colorspaces with clarity

On this forum as on MoneyLaw and on The Cardinal Lawyer, I've confessed my obsession with the mathematics of TrueColor. On the strength of a single Google search — RGB cube — I've found two sites that have truly sharpened my understanding of the mathematics of color.


The difficulty in translating between the RGB and HSV colorspaces is a three-dimensional variation on one of the basic problems of plane geometry that frustrated the ancients. You can't square the circle, not with rational numbers at any rate, and a fortiori you can't turn either a sphere or a cone into a cube without resort to that constant as beautiful as it is irrational, π.
Read the rest of this post . . . .Difficult, that is, till I encountered this page, which explains the relationship between the RGB and HSV colorspaces in elegant, crystal-clear terms. The line drawing atop this post summarizes the beautiful relationship between the RGB and HSV colorspaces. Connect the origin of the RGB cube with its opposite corner, and let that line represent the entire grayscale from pure black to pure white. Then all colors sharing the same value can be represented as a plane perpendicular to that so-called neutral axis. Each degree of saturation manifests itself as a cone of a certain width around that axis. And if you set the red axis to 0 and 360 degrees of a circle connecting all six of the nonblack/nonwhite vertices of the RGB cube, then hue is a wedge — half a triangular section of the HSV cone, if you will, right through the neutral axis — dialed to the specific point around that circle.

Y = 0.30 R + 0.59 G + 0.11 B
where Y represents luminance and R, G, and B represent, respectively, the relative amounts of red, green, or blue. When red, green, and blue are expressed in decimal terms, R, G, and B can be computed by dividing rgb(x, y, z) values by 255. When red, green, and blue are expressed in hexadecimal terms, R, G, and B can be computed by dividing each pair in a hex triplet by FF.
The following table explains the luminance associated with some of the most frequently used colors in the Jurisdynamics Network's stylesheets. Some of my choices, especially ochre lettering on an olive green background, fall a bit short of the ideal minimum of a .500 difference in luminance, but they come close enough to provide readable contrast:
Color | Hex triplet | Luminance |
Ochre | dddd99 | .834 |
Olive | 668844 | .464 |
Siena | cc6600 | .476 |
Bright ochre | eeeeaa | .904 |
Color is math, math color — That is all
Ye know on earth, and all ye need to know.
1 Comments:
Such a great article which The RGB colorspace is conceptually cubic. Its three axes red, green, blue define the colors emitted by the contemporary equivalent of the cathode ray tubes that powered color television.In which The difficulty in translating between the RGB and HSV colorspaces is a three-dimensional variation on one of the basic problems of plane geometry that frustrated the ancients. Thanks for sharing this article.
Post a Comment
<< Home