CSS Colors are set using different methods such as CSS color name format , example : Green , Red , or CSS RGB format, or CSS HEX format, also using RGBA , HSL and more.
CSS color values affect the element text, border, background and his decorative effects
CSS colors may be normal colors, glowing colors, transperent colors, and many more options, we can also create a CSS animation, but that is for another tutorial.
In the next table we added some examples of CSS color formats:
CSS Color name
red, green, etc
CSS Short Hex
CSS Hex Code
CSS RGB %
CSS Colors - RGB Values
The CSS RGB format is set using the rgb( ) property, there are 3 values, each for red, blue, green, each one can be set using numbers from 0 to 255, example: rgb(0,0,255) , we can also set percentage as color value, not every browser supports RGB so do not use it.
The CSS short HEX format is a shorter method of the CSS HEX format, as we said before, you can generate numbers yourself or by any graphic design software and also some code editors allow you to generate numbers easily.