How does hexadecimal color work?

后端 未结 7 1715
刺人心
刺人心 2020-12-05 10:24

What does the hexadecimal that represents a CSS color mean? How can I tell what color it is without memorizing the exact code? Does it have any relationships with RGB (and C

相关标签:
7条回答
  • 2020-12-05 11:11

    The HEX code is representing three bytes, one for each of the RGB colors in that order.

    FF0000 is full RED intensity, 00FF00 is full GREEN intensity, 0000FF is full BLUE intensity

    8040FF corresponds to 128 RED, 64 GREEN and 255 blue

    You can also write a short form where you don't specify the low 4 bits of each byte, like FFF for full WHITE, F00 for full RED, 00F for full BLUE

    0 讨论(0)
提交回复
热议问题