CSS Hex Code Colors With Alpha Values
byI use hex codes for color values - most of the part in my css than rgb or color name. We have limited named colors in css hence less color palette to work with so I generally don’t use them much frequently.
In rgb we have colors made of Red Green Blue channels. Values of each channel range from 0 to 255. In hex code, each digit contain values ranging from 0 - 9 and A - F - total 16 values. To represent each color channel we have two digit per channel that can provides us 256 combination of values.
FF is 240(15 * 161) + 15(15 * 160) = 255 (White)
Now we have #RRGGBB - two digit hex for each color channels.