+ 1

When shoul i use # and when i should not?

hello, may I ask you a question? i have read that html colors should alxayd start with # is it true? is there any color that doent follow this rule? thanks for your answer previously.

10th Jun 2017, 11:46 PM
Enmay Mk
Enmay Mk - avatar
4 Respuestas
+ 6
# is only used and required for hexadecimal notation of colors... as you have several notations available for colors in Css: << The <color> CSS data type represents a color in the sRGB color space. A color can be described in any of the following ways: - using a keyword - using the RGB cubic-coordinate system (via the #-hexadecimal or the rgb() and rgba() functional notations) - using the HSL cylindrical-coordinate system (via the hsl() and hsla() functional notations) >> source: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
11th Jun 2017, 12:25 AM
visph
visph - avatar
0
I don't think it matters. I wouldn't suggest using color names, as they aren't as accurate, but otherwise, they are the same. The only time you couldn't use hexadecimal (#) or rgb is when you want transparent colors (rgba).
11th Jun 2017, 12:11 AM
Cailyn Baksh
0
thank you so much
11th Jun 2017, 12:13 AM
Enmay Mk
Enmay Mk - avatar
0
thanks
11th Jun 2017, 12:26 AM
Enmay Mk
Enmay Mk - avatar