What do you prefer RGB or HEX? and why? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What do you prefer RGB or HEX? and why?

Just wondering which is better to use? .. ^_^

29th May 2017, 4:27 PM
jamilxt
jamilxt - avatar
2 Answers
29th May 2017, 4:39 PM
MR Programmer
MR Programmer - avatar
0
I believe that it is mostly a matter of personal taste whether you should use RGB or HEX. Personally I use HEX, because it feels more convenient - it is easier to scan when reading the code and easier to copy from your preferred image editor. Also for colors like white (#fff), black (#000) it could save you a few bytes (not that it would make much difference though). In the end it is really just two different representations of the same thing, and from a performance perspective I don't think it matters. At least there are loads of other things you can do to increase performance, that will have a greater impact on performance. - by - @ Christofer Eliasson from - https://stackoverflow.com/questions/9802876/css-rgb-or-hex-for-color
29th May 2017, 4:47 PM
jamilxt
jamilxt - avatar