An Easy Way to Choose Attractive Color Combinations

Written by Sunil Tanna


Continued from page 1

4. Repeat step 3 forrepparttar 2nd, 3rd, etc. most prominent colors inrepparttar 143607 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 userepparttar 143608 former. If you want to use your colors in HTML code, you'll need to convertrepparttar 143609 three numbers into hexadecimal, and putrepparttar 143610 digits in order RRGGBB.

A quick way to do this is:

1. Startrepparttar 143611 Windows calculator.

2. Make sure that it's in "Scientific" mode (on View menu).

3. Make surerepparttar 143612 "Dec" radio button is selected.

4. Enter a decimal number.

5. Clickrepparttar 143613 "Hex" radio button, and note downrepparttar 143614 value. Ifrepparttar 143615 value is only a single digit, add a leading 0.

6. Repeat steps 3 to 6 for each ofrepparttar 143616 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 inrepparttar 143617 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 needrepparttar 143618 triplet of Red, Green and Blue values that we've talked about throughout this article.

2. For each ofrepparttar 143619 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 convertrepparttar 143620 C2 part to CC - We would convertrepparttar 143621 0F part to 00 - We would convertrepparttar 143622 8C part to 99 - And thus we would CC0099 asrepparttar 143623 final color.

Aboutrepparttar 143624 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/


Using and Converting to Color-Safe Palettes

Written by Sunil Tanna


Continued from page 1

- In some cases,repparttar colors that aren't available will be converted to their nearest "color-safe" equivalent. This can lead to your web page looking different from what you intended.

- In other cases, particularly for large areas of continuous color (such as backgrounds and tables),repparttar 143606 browser may attempt to simulaterepparttar 143607 your chosen color by "dithering" two or more color-safe colors together. This usually makesrepparttar 143608 colors look grainy, and very often looks absolutely terrible. If you don't know what I mean by "dithering", seerepparttar 143609 explanation at: http://www.graphicsacademy.com/what_dither.php

The Solution:

Review your HTML coding, and look atrepparttar 143610 colors in each COLOR= attribute... then change them to their closest color-safe equivalents.

(You might want to make a safe copy of your web pages before doing this, in case you make an oopsy).

Understanding The COLOR Attribute In HTML Code:

If you look atrepparttar 143611 COLOR= attributes inrepparttar 143612 HTML code, it usually looks something like this

COLOR="#C20F8C"

(Sometimes you may also see named colors like "RED" or "MAGENTA" which is beyondrepparttar 143613 scope of this discussion, just skip over any of those).

The values inrepparttar 143614 quotes afterrepparttar 143615 hash symbol, are actually three pairs of digits, representingrepparttar 143616 Red, Green, and Blue components ofrepparttar 143617 color expressed as hexadecimal numbers inrepparttar 143618 range 00 to FF.

So forrepparttar 143619 color given above:

- C2 isrepparttar 143620 Red component - 0F isrepparttar 143621 Green component - 8C isrepparttar 143622 Blue component

There is also a three-digit variant ofrepparttar 143623 above which you may very occasionally run across:

If you see something like: COLOR="#F9C"

Then you simply need to repeat each digit, thus F9C represents:

- FF forrepparttar 143624 Red component - 99 forrepparttar 143625 Green component - CC forrepparttar 143626 Blue component

Converting to Color-Safe Colors:

Now we understandrepparttar 143627 theory, we're ready to convert a color to its closest color-safe equivalent.

For each ofrepparttar 143628 Red, Green and Blue components, you need to convert them separately into values, you need to convert them separately intorepparttar 143629 color-safe equivalents, and then recombinerepparttar 143630 whole lot together.

The conversion step goes like this:

00 to 19 - converts to 00 1A to 4C - converts to 33 4D to 7F - converts to 66 80 to B2 - converts to 99 B3 to E5 - converts to CC E6 to FF - converts to FF

For example:

If we need to convert C20F8C to its closest color-safe equivalent:

- We would convertrepparttar 143631 C2 part to CC - We would convertrepparttar 143632 0F part to 00 - We would convertrepparttar 143633 8C part to 99 - And thus we would CC0099 asrepparttar 143634 final color.

Some other examples:

2B2CF0 would convert to 3333FF C000C0 would convert to CC00CC F0A000 would convert to FF9900 And so on...

Aboutrepparttar 143635 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/


    <Back to Page 1
 
ImproveHomeLife.com © 2005
Terms of Use