Continued from page 1
4. Repeat step 3 for
2nd, 3rd, etc. most prominent colors in
image. Depending on how many colors you need for your color scheme, you'll know when to stop (hint: too many colors can make your designs look confused and messy).
Converting Decimal to Hexadecimal:
The RGB three color values that you picked up in your paint program may either be in decimal (0 to 255) or hexadecimal (00 to FF) - most paint programs tend to use
former. If you want to use your colors in HTML code, you'll need to convert
three numbers into hexadecimal, and put
digits in order RRGGBB.
A quick way to do this is:
1. Start
Windows calculator.
2. Make sure that it's in "Scientific" mode (on View menu).
3. Make sure
"Dec" radio button is selected.
4. Enter a decimal number.
5. Click
"Hex" radio button, and note down
value. If
value is only a single digit, add a leading 0.
6. Repeat steps 3 to 6 for each of
three numbers in your triplet of RGB values.
For example:
R (decimal) = 194, converts to C2 (hexadecimal) G (decimal) = 15, converts to 0F (hexadecimal) B (decimal) = 140, converts to 8C (hexadecimal)
Therefore color to use in
HTML code is C20F8C.
Manual Conversion To Color-Safe Palette:
I promised earlier that I would tell you how to manually convert a color into a color-safe value if your paint program doesn't have a built-in function for this. Here's how:
1. First, for your color, you need
triplet of Red, Green and Blue values that we've talked about throughout this article.
2. For each of
three values, you need to convert them separately into their color-safe equivalents.
If you're starting from decimal values:
0 to 25 - converts to 0 (decimal) or 00 (hexadecimal) 26 to 76 - converts to 51 (decimal) or 33 (hexadecimal) 77 to 127 - converts to 102 (decimal) or 66 (hexadecimal) 128 to 178 - converts to 153 (decimal) or 99 (hexadecimal) 179 to 229 - converts to 204 (decimal) or CC (hexadecimal) 230 to 255 - converts to 255 (decimal) or FF (hexadecimal)
If you're starting from hexadecimal values:
00 to 19 - converts to 0 (decimal) or 00 (hexadecimal) 1A to 4C - converts to 51 (decimal) or 33 (hexadecimal) 4D to 7F - converts to 102 (decimal) or 66 (hexadecimal) 80 to B2 - converts to 153 (decimal) or 99 (hexadecimal) B3 to E5 - converts to 204 (decimal) or CC (hexadecimal) E6 to FF - converts to 255 (decimal) or FF (hexadecimal)
For example:
If we need to convert C20F8C to its closest color-safe equivalent:
- We would convert
C2 part to CC - We would convert
0F part to 00 - We would convert
8C part to 99 - And thus we would CC0099 as
final color.
About
Author: This article was written by Sunil Tanna of Answers 2000. For more graphics tutorials, tricks and tips, please visit http://www.graphicsacademy.com/

This article was written by Sunil Tanna of Answers 2000. For more graphics tutorials, tricks and tips, please visit http://www.graphicsacademy.com/