Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Css colors (#999 for example) - Why just three digits? [duplicate]

Tags:

css

Possible Duplicate:
3 digit Hex color code
Using 3-digit color codes rather than 6-digit color codes in CSS

I have a color that has the following RGB values:

255-223-145

I see that lots of pages have the colors with just three digits, for example:

color: #999;

I wonder why, and how would I convert these rgb values to a three digit color.

Thanks

like image 349
Hommer Smith Avatar asked Dec 21 '22 13:12

Hommer Smith


1 Answers

It isn't a three digit colour, #999 is merely shorthand for #999999 so unless your numbers repeat like #223322 (#232) you can't cut it down.

The question has two bits, to convert hex to rgb, use a tool like this or this online.

like image 80
Andy Avatar answered May 22 '23 11:05

Andy