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

HTML How to Make a Website Customizing Colors and Fonts Use Color in CSS

MICHAEL P
MICHAEL P
5,191 Points

Why would you use Hexadecimal instead of just typing out the color wanted?

Hi,

I am not clear :Why would you use Hexadecimal instead of just typing out the color wanted?

The list of HTML-reserved words (see: X11 color names here) for colors is extremely limited; unless you can build up a reasonable palette using only those several dozen colors, it's better to use hex, as there are millions of available combinations. In all reality, you very well could build up a decent palette using only X11 names, it's just not recommended, nor is it industry standard. When coupled with a CSS preprocessor like Sass or Less, you can even use hex once per color in your palette, assign each a variable, and then call each color with your own named variable.

If you're looking for something more human-readable, use HSL, as its syntax is much more intuitive than either hex or RGB.

Hope this helps.

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! There are around 140 reserved words for colors as shown in the MDN documentation. However, using hexadecimal allows many more variants/shades of these colors. So if you needed something that was slightly off of one of these colors, you'll need to use either RGB, RGBa or Hexadecimal.

Hope this helps! :sparkles: