Q:

# How do color name codes work in programming?

A:

Color name codes, or hex color codes, work to tell the computer which combinations of red light, green light and blue light to display on the computer screen. A hex code has six digits, comprised of three two-digit number and letter combinations that represent red, green and blue, respectively. Each two-digit number or letter combination represents a level of each color on a scale that goes from the numbers zero to nine, then from the letters “A” to “F.”

## Keep Learning

In hex color codes, a value of zero is the lowest color saturation and a value of “F” is the highest. For instance, the hex code #FFFFFF represents white as the brightest possible shade of the three main colors, whereas a hex code of #000000 represents black as the darkest possible shade of all three main colors. Using hex codes, #FF000000 represents pure red and #0000FF represents pure blue. Abbreviated hex codes work the same way as full-length hex codes do, but only have three digits. Each of the three digits represents a pair of identical digits—for example, #0F0 represents #00FF00.

Hex codes derive their name from the hexadecimal number system, which refers to the two-digit system of counting. Through this system, only two digits are able to represent 256 shades of each base color.

Sources:

## Related Questions

• A: According to CodeConquest.com, server side programming is a type of programming that relies on code operated from the server of a website, not the computer... Full Answer >
Filed Under:
• A: Pseudocode explains a computer programming algorithm in logical, rational terms in the format of computer programming lines without creating an actual prog... Full Answer >
Filed Under:
• A: Jobs in the computer science field require computer savvy skills, such as coding and programming. To say that computer science is difficult is simply not t... Full Answer >
Filed Under:
• A: Procedural oriented programming is a list or set of instructions telling a computer what to do step by step and how to perform from the one code to the nex... Full Answer >
Filed Under:
PEOPLE SEARCH FOR