Is there any point learning hex code

There are a lot of websites online that give codes for various hex codes like cssgradient.io. So is there any point in learning how the hex codes and RGBA work if I can take them online?

it’s not necessary, but it may be useful: the first two digits are the red, the second two are the green, the third two are the blue, same order of the rgb() method

zero for all 3 is black, 255 (FF) for all three is white

1 Like

I wouldn’t say it’s necessary to learn hex codes, but you’ll no doubt pick up some commons ones along the way, that can help speed up coding!
Such as white = #fff … but as browsers accept the word “white” as well, you’ve effectively got a free CSS variable there :sweat_smile:

Also, when dealing with accessibility, you’d more likely use HSL … or if dealing with transparency, RGBA .

WIth all the tools available nowadays, I’d say don’t worry about it :slight_smile:

1 Like

Why HSL helps in accessibility?

1 Like

You can use transparancy with hex also, like #ababab66

1 Like

“Learn” as in learn to count and think in hex? No, not of a web developer. “Learn” as in being familiar with the concept and know where to convert if needed? Yes.

1 Like

Thank you all, i understand the concept of hex codes but I won’t remember the codes in it. Well we’ll see that later on imma only a kid.

I’m sorry - I didn’t realize you were “a kid”. Have you encountered in school the concept of different number bases or radices? It would be good to have a basic understanding of that. In computer programming, in addition to decimal you also historically had to understand binary, octal, hexadecimal, and even base-64. The need for that is lower in web dev, but at least understanding what binary is is good and occasionally you need hexadecimal and base-64. You don’t have to know that up and down. I may not be able to look at a hexadecimal number like 5C and instantly know that it is 92 - I can convert it easily online. But I should be able to understand why it is 92 and even calculate that if I had to. (I won’t need to, but just to have that understanding.)

If you haven’t encountered it in school yet, I’m sure there are a lot of great tutorials and videos online.

sure thanks. In India, the education system is quite low… so I haven’t encountered it.

OK, then I’d just look on youtube for videos explaining hexadecimal and binary. It probably wouldn’t hurt to understand our system, the decimal system (invented in India, no less). Those are what you will encounter most, but occasionally you will hear about octal. Base-64 is occasionally used to encode data, but you are usually using a library so it is no difficulty.

Just get the basic idea down. You don’t have to worry about being able to convert between them in your head.

sure thanks a lot @kevinSmith for replying and your concern. Thank you.