# CSS color codes

#### Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

•  Subject
• Author
• Posted on
Now that I'm learning that colors can be coded in CSS with a 3 digit
code (rather than the 6 digit rgb code) is there a chart anywhere that
lists the 3 digit codes?  I've googled and come up empty.  Or, can I
use the 6 digit chart I've had for years and figure out the 3 digit
CSS color code?

Thank you!

Leslie

## Re: CSS color codes

Each hex digit in a three-digit code is simply doubled up (multiplied by 11
hex) to create the corresponding six-digit code.  I.E. #bad is shorthand
for #bbaadd.  This means that three-digit codes specify only a subset of
the colors that can be specified by six-digit codes.

## Re: CSS color codes

See if this helps you:
http://home.clara.net/guycroft/utils/coloropts.html

Paul

## Re: CSS color codes

: Now that I'm learning that colors can be coded in CSS with a 3 digit
: code (rather than the 6 digit rgb code) is there a chart anywhere that
: lists the 3 digit codes?

No chart.  The 3-digit code is an abbreviation.

#CCFFCC = #CFC
#112233 = #123
#121212 = #121212  (can't abbreviate)

Sid

## Re: CSS color codes

Sid! wrote:

> wrote:

> : Now that I'm learning that colors can be coded in CSS with a 3 digit
> : code (rather than the 6 digit rgb code) is there a chart anywhere that
> : lists the 3 digit codes?

> No chart.  The 3-digit code is an abbreviation.

> #CCFFCC = #CFC
> #112233 = #123
> #121212 = #121212  (can't abbreviate)

> Sid

The closest 3 digit version to 121212 would be 111.
#CAFACA would still equal #CFC

In essence you have CC + FF + CC to equal the color.
to equate to 3 digit, remove the 2nd digit from each pair.
If red is #FF0000 or #F00, Then #F10000 is nothing more than a lighter shade
of red.

## Re: CSS color codes

:  > : Now that I'm learning that colors can be coded in CSS with a 3 digit
:  > : code (rather than the 6 digit rgb code) is there a chart anywhere that
:  > : lists the 3 digit codes?
:
:
:  > No chart.  The 3-digit code is an abbreviation.
:
:  > #CCFFCC = #CFC
:  > #112233 = #123
:  > #121212 = #121212  (can't abbreviate)
:
:  > Sid
:
: The closest 3 digit version to 121212 would be 111.
: #CAFACA would still equal #CFC
:
: In essence you have CC + FF + CC to equal the color.
: to equate to 3 digit, remove the 2nd digit from each pair.
: If red is #FF0000 or #F00, Then #F10000 is nothing more than a lighter shade
: of red.
:

What are you on about?  We don't want the closest colour - we want that
colour!   We're not talking closest to websafe colours (I know 111111
isn't).

Who wanted a _lighter_ shade of red??

Sid

## Re: CSS color codes

Sid Ismail wrote:

I'll have one - if they're on 'special' this week.

--
William Tasso

## Re: CSS color codes

Isn't that a lighter shade of pale?

Cheers
Richard.

## Re: CSS color codes

rf wrote:

I think you'll find it was a Whiter Shade of Pale.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?page=132

## Re: CSS color codes

Yep. That's it.

Showing our age, methings :-)

Cheers
Richard.

## Re: CSS color codes

rf wrote:

It was recorded 13 years before I was born. :-)

Interesting page:
http://www.procolharum.com/awsopint.htm

--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?page=132

## Re: CSS color codes

Fri, 21 Nov 2003 12:28:54 +0000
Toby A Inkster ha scritto:

uhh...the memories...I was in hight school already. :)

Very interesting indeed. Thanks.

--
Maria Luisa C - 21/11/2003 15.22.20, here.
un tutorial sulle Espressioni Regolari:
http://fido.altervista.org /