HTML CSS course question about colors


Hi all,

I’m new here so pardon me if this is posted in the wrong place or already answered. I am finishing up the HTML5 and CSS part of the course where I am learning about the color values. So far, I’ve been introduced to using their names, hex codes and rgb values. I can see that using the names is limiting and that the rgb values can adjust brightness, but I was wondering which of the three of these is the most common/useful to know for a beginner or should I find resources of all of them? Do different languages prefer using one over the other?

Thanks for helping,



I use them all, pretty much interchangeably.

If I don’t want to be too picky about the exact color, I use simple descriptive names. If I want more control, I’ll use the hex codes. I don’t use the RGB codes much (pretty much interchangeable with hex codes), but I did use them for some things on the D3 builds for formula created colors.

I think you’re overthinking it a bit. Just use whatever works.


I tend to overthink things. :slight_smile: Thanks for the answer.


I tend to use hex code, but you can always google “color picker” and just select the color you want, it gives you hex and rgb values for the chosen color. Very handy!


Its good information to know… no harm in asking!

Most commonly used would be hex codes. The only time I ever use a colour name is when Im planning out my layout and not ready to muck with the actual colour scheme yet. Thats likely just a personal preference thing, but I rarely ever use red, blue, green, etc… I want a very specific hue of my chosen colour, so hex codes it is.

I have used RGB but trying to remember why off the top of my head and can’t…its happened and when I do theres a particular reason for it, but if I can Ill use hex.


I think most Devs will use hex values, but there’s real power in rgba.

That said, when I need a quick color or palette, I use names from this website. You can click on the color chip and it will change the background too (allowing you to see how different colours interact with that “base color”.


Thank you all for your replies!


Hex codes usually… but rgba format allows you to control Opacity (i.e. The Alpha in rgba) from fully opaque to fully transparent.


They’re all functionally the same thing, and hex and RGB are 100% interchangeable once you know how to convert between them. The one thing to note about using RGBA though is that old versions of Internet Explorer don’t support it—so if you want your site to work on IE8 or older, you have to ditch it and use straight hex values instead.