Which color code we should choose for CSS?

HEX or RGB or HSL?

HEX is the most common used color code. It makes the CSS clean and compact. Example: #CCC

RGB/RGBa is designer friendly and easy to understand. It’s easy to manipulate using Java Script. Supports alpha channel which is very handy. Example: rgba(204, 204, 204, 1)

HSL/HSLa is another designer friendly color code. Percentage makes it easy to understand it’s output. I read somewhere rendering time is slightly slower than HEX and RGB. Example: hsla(0°, 0%, 80%, 1)

I prefer both HEX and RGB, but I don’t use both in a same project.