Which color function would be best to use?

So I just finished the “Learn CSS Colors by Building a Set of Colored Markers” (Thank god) project. I have a few questions. Which color function do ya’ll mostly use for changing the colors? RGB, RGBA, hex decimal colors, or do you just type the name of the color? Do you use one over the other cause of ease of use or does it depend on the situation?

you use whichever works best for the situation, or whichever works best for you. You could try to read this article, if you want, maybe it gives you a better idea.

2 Likes

I most often end up using hex colors because I copy them out of the browser dev tools and that is the default. It is easy enough to change, I just rarely do it (you can shift-click the color to switch). That is, unless it has an alpha channel then it is rgb/rgba (depends on the browser, the Chrome dev tools change the rgba function to an rgb(n n n / percentage) function which is a little annoying).

I only use color names when mocking/testing stuff (I guess I do use white sometimes but not often as pure white is too bright).

The HSL function can be handy when you want to test different light/dark/sat settings. It is easier to work with in the dev tools (you can use the arrow keys to change the values).

There are a bunch of new color spaces/functions added recently. I haven’t used them much and I think they are mainly useful for blending (like high-definition gradients). It is also just a little overwhelming.

2 Likes

Much appreciated. This will be great for using as a reference. Reading it kinda made a few things stick, and all the names for colors are on here. Big help.

1 Like

Thank you for giving me a little insight on how you use colors. Appreciate the heads up on the (rbg(n n n / percentage) I probably would of been confused when coming across that. Got to put in some practice with hex colors, and that article you tagged is a great reference. Much appreciated.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.