Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Hexadecimal values

This is just been bothering me, but one thing has been confusing me for a while... Take the following code for example:

* {
  color: #abc;
}
/*  Does this hex value: #abc, in full form mean #aabbcc or #abcabc?   */

this has been confusing me for a while now and i just want to confirm the correct full form...Thanks!!

From what I understand, that is a shorthand for #aabbcc.

John Collom has it right. To make it easier fff is translated to ff-ff-ff and 000 becomes 00-00-00. So abc becomes aa-bb-cc. Hexadecimal values use 3 two digit values to create color so anytime abbreviation is used browsers automatically expand the abbreviation into a full 6 digit hex value.

1 Answer

What John Collom said- hexadecimal short hand is for when the values are the same for each color type- red, green, and blue.