views:

84

answers:

3

hi there.

what is the color limit for designing a website? is it limited to 256?

will it work on all browsers if i select any color from photoshop color palette?

edit: i am talking about the color attribute in the css

+5  A: 

The same as the display of the user viewing the website (which, more often then not, is 32-bit these days).

David Dorward
you mean to say i can use any color i like? i am talking about the color attribute in the css property.
Ibrahim Azhar Armar
So long as you can express it with the values that said property accepts.
David Dorward
+3  A: 

If you mean how many colors you can specify using rgb() or hex codes, you can specify up to

256 * 256 * 256 = 16,777,216

different colors (each 256 corresponds to a range of 0 (0x0) to 255 (0xFF) for each of red, green and blue).

This does not consider the web-safe color palette of 216 colors that Martin Beeby mentions, or the display capabilities of any monitors for that matter.

BoltClock
and i thought it was only limited to 256 :), thank you for the information.
Ibrahim Azhar Armar
If you don't want to use rgb you can use the hex colors from your color pallet in photoshop.
Nicknameless
+3  A: 

Back in the day, Netscape Listed 216 colours that were considered websafe. Nowadays that can be ignored as most computers are capable of reproducing all millions of colours... Worst case senario the browser will dither the colour to somthing the graphics card on the computer can display.

See http://en.wikipedia.org/wiki/Web_colors for more info.

Martin Beeby