Home » Scripts Utilities Script

Hex Converter



2.7/5.0 (30 votes total)
Rate:

Description:

This JavaScript converts a hex code and tells you its name (ie: FFFFFF converts to white).

This code can be used for many differant types of applications. Imagine having an online help, or a catalog with 1000's of items!

For this example, we used a library of colors. Simply enter a color into the textbox below - depressing the 'submit' button will bring up an alert window giving the hex value of the color (if it exists in the database). It will also bring up a small window with the background as the color you requested.

Please input a color:


Enter a hex value in the textbox. Do not include the "#" symbols and make sure the letter values are in "CAPS". Hit submit and it will display the color's name in the box below. Pressing 'view' will bring up a small window with the background as the color you requested.

Please input a hex value:


Result

JavaScript Functions:

HTML Script:


Add commentAdd comment (Comments: 0)  

Advertisement

Partners

Related Resources

Other Resources

arrow