General
This script will brighten or darken colors, preserving the true color hue. The color's hexadecimal numbers are displayed for further use.
| Original | New |
Notes
- Created by: Joseph Myers
- Web Site: http://www.codelib.net/
- Posted: May 28, 2008
Enter the original hexadecimal color value, either as a three-digit or six-digit value. Enter the scale factor (as an integer or a decimal value), and click the "Output" button in order to find the new hexadecimal color value. To darken the original color, enter a scale factor less than 1, such as .5. To brighten the original color, enter a scale factor like 5, to bring it five times closer towards white. Clicking on the bottom color bar will provide the hexadecimal number for that color in the scale, displayed in the "Output" box.
Source Code
Paste this source code into the designated areas.
External file
Paste this code into an external JavaScript file named: trueColor.js
Head
Paste this code into the HEAD section of your HTML document.
Body
Paste this code into the BODY section of your HTML document
Do you write JavaScripts?
If you do, why not submit them to us?
We'll give you credit and a link back to your Web site.
