We generally use Base-10 in everyday life, which means that we have 10 digits (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) available. This is possible because hex uses Base-16. The critical difference is that the hex system represents the numbers from 0 to 255 using just two characters. Hex color codes are similar to RGB as they also use 256 shades for each individual color. Long and RGB are related they are just different ways of calculating the same number. Long = Blue x 256 x 256 + Green x 256 + Red The relationship between RGB and long is based on a simple calculation:
The long code is a number from 0 to 16,777,215, where each separate number represents a color. The following macro displays the long code for the fill of the active cell. The long color code is used by VBA when displaying the color property of an item. Instead, Excel measures all the numbers where 0 is the lowest and 255 is the biggest. 0% is black, 100% is white.įrustratingly, Excel does not handle HSL in the standard way.
Luminance (or lightness) – is a percentage of grey.Saturation – is a percentage of the amount of color included.Hue – is the degree on the color wheel from 0 to 360.HSL tries to define colors closer to the way humans think about colors.
HSL uses Hue, Saturation and Luminance to create the color. Within the standard color dialog box there is another code format using the color model drop-down we can change to HSL. The individual colors Red, Green and Blue each have 256 different shades, which when mixed can create 16,777,216 different color combinations. The RGB (Red, Green and Blue) color code is used within the standard color dialog box.