Hermetic Color Picker

This is a program which allows you select a color visually and then get the red, green and blue components, expressed either as decimal, hexadecimal or as RGB values, which can then be copied to the clipboard for pasting elsewhere.

Since Isaac Newton demonstrated in 1665 that white light can be decomposed into a spectrum of colors and (amazingly!) that those colors could be recombined to give white light, the phenomenon of color has been analysed conceptually in over a hundred ways. The electronics world has adopted one particular analysis, which says that any color is a combination of three components, namely, the red component, the green component and the blue component. This RGB color model was proposed in 1850 by Hermann von Helmholtz (building on earlier studies of human color perception by Thomas Young).

The color of each pixel on your monitor is composed of individual red, green and blue colors. Each of these components can have an intensity measured on a scale of 0 through 255. Thus the number of possible pixel colors is 256*256*256 = 16,777,216 (although studies of retinal cone cell sensitivities indicate that humans can actually distinguish no more than about a million colors). The RGB color model can be imagined as a cube in Cartesian space, with each coordinate ranging from 0 through 255. Fixing a value for a particular x-, y- or z- coordinate produces a plane through this cube such that all colors in this plane have a fixed red, green or blue component. This is the conceptual basis for this color picker software.

At startup the Hermetic Color Picker program appears as at right (or as it was when quitting the program from the previous run). First select whether you wish to specify a background color or a foreground color. Selection then of the base color (red, green or blue) determines which color component has a fixed value. The 16 small boxes then show 16 planes of the color cube with 16 different values of the selected color component (equally spaced from 8 through 248). Clicking on one of these will copy the selected plane to the large box. Then click on a pixel in the large box to set the values of the other two color components. The specified color is not changed by switching to a different base color, but the location of the pixel in the large box changes when you do this. (Selecting a new base color is equivalent to rotating the plane through 90° while keeping the specified color within it.)

The value of the base color component can also be specified via the base color decimal textbox or the base color hex textbox (be sure to click on the Apply button or simply press the Enter key).

The foreground color can be specified in the same way (after selecting Foreground color).

The textbox which displays "This sentence shows foreground on background" changes when you change the foreground or background colors, so you can immediately see how foreground color on background color looks.

To get a particular color for which you know the values of the red, green and blue components, select each base color in turn and enter the values in the base color value textbox (click on Apply each time). After the third entry that color will be shown.

The foreground and background colors can be saved via the 'Save' button (they are also saved on Quit). If you make changes then the saved values can be restored via the 'Restore' button.

```Background color:
red   240 (dec.)  F0 (hex.)
green 202 (dec.)  CA (hex.)
blue  248 (dec.)  F8 (hex.)
16304880 (decimal)
RGB(240,202,248)  (RGB function for Visual Basic)

Foreground color:
red   110 (dec.)  6E (hex.)
blue  216 (dec.)  D8 (hex.)
14200174 (decimal)