Javascript: an HTML color checker

The tutor offers a little utility that connects the user with HTML color.


In web coding, one way HTML colors are indicated is as follows:

style=”color:#ff0000″

More specifically, the color string is of the form #rrggbb. After the hash tag, the first two digits are for red, the next two for green, then the final two for blue. The digits are in hex, meaning base 16. (For more info, see my post on hexadecimal numbers.) Each “digit” has the possible range 0-f; after 9 comes a. Some examples:

#ff0000 bright red
#ffff00 yellow
#ff00ff hot pink
#ffffff white
#000000 black

Below is a color input device via which you can check color combinations. Don’t enter the hash tag; it’s already included. Just enter the six hexadecimal digits 0-f, then click the button to see the color you’ve invented:)

Enter your color digits (0-f) here: #

See your color here:)

HTML colors can be fun to experiment with.

Source:

w3schools.com

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Tagged with: , ,

Leave a Reply