Difference between hex colour, RGB, & RGBA and when should each they be used?

后端 未结 3 821
北恋
北恋 2020-12-19 02:57

While looking at tutorials for a multitude of topics, I\'ve often seen RGB & RGBA be used instead of hex codes for colours in HTML/CSS.

Can someone explain to m

3条回答
  •  隐瞒了意图╮
    2020-12-19 03:22

    RGB (Red, Green, Blue) values are more archaically but universally used across different industries including printing and publishing. In the past it was more widely used in websites than it is today.

    RGBA (Red, Green, Blue, Alpha) is used for making a colour transparent. The value for A (alpha) is from 0, completely transparent, to 1 completely opaque.

    hex, is a more recent quick easy value used exclusively for websites and applications.

提交回复
热议问题