Why aren't you using HSL?
What if I asked you "what is the hex code for yellow in CSS?" It's #ff0
. Now I don't know if you knew that or not, but let's keep going. What is the hex code for purple? What is the hex code for green? What is the hex code for red? How many of those did you know off by heart? Probably not a whole lot, if any. When it comes to hex color codes, I know what black and white is and then things quickly move towards needing a color picker of some kind. Just FYI, purple is #7f00ff
, green is #0f0
, and red is #f00
.
What if I said you can use the RGB model? With a bit of color theory, you could figure out all of those colors without needing anything else. Let's start with red. Well that's easy! RGB stands for Red, Green, Blue. We know 255 is 100% of that color, so red is RGB(255, 0, 0). Green would be RGB(0, 255, 0) and blue RGB(0, 0, 255).
So what is yellow? Ok, yellow is an equal mix of red and green. So 1 to 1 of red and green, therefore yellow is RGB(255, 255, 0). What about...