HTML Color Tester

Quick Info About HTML Color

Color in HTML is represented by either RGB values (rgb(125, 67, 255) for example) or in a hexadecimal (base 16) format (such as #7D43FF). These two values are exactly the same. Just different representations. Note that the maximum value in any channel is 255 (or FF in hex).

In this example, 125 is converted to 7D, 67 converts to 43, and, of course, 255 converts to FF. More details on the conversion can be found here. Here's the basics of the conversion, though:

This is written in reverse order so 125 becomes 7D. After dividing, always subtract the whole number so you are only left with the decimal value. In the second step above, that value was 0 so we could technically skip it. It's included here for clarity, however. The second step is handling the 7 from step 1. Again, more detailed examples and explanations are provided in the link above.

Now that we've got that out of the way, the fun part: figuring out colors. In hex, it is a text representation of RGB values: #FFFFFF (this code is actually for white). But there's a twist. Red and Green together make yellow (#AAAA00) while Green and Blue together make cyan (#00AAAA).