HTML - Color
HTML - Color
Modern browsers support 140 named colors! Background /Text color can use following color values:
W3C
Web Colors
W3Schools
HTML Color Codes
MDN <color> - CSS: Cascading Style Sheets
https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
Modern browsers support 140 named colors! Background /Text color can use following color values:
- Hexadecimal color codes (e.g. color:#FF0000)
- Color names (e.g. color:orange)
- RGB values (e.g. color:rgb(255,0,255))
- rgb( RED , GREEN , BLUE )
- rgba() – a is for alpha, a color channel that controls opacity
- value from 0 – 1 (0: Transparent, 0.1, ..., 1 for fully opaque)
- color:rgba(255,0,255,0.3)
- HSL values (e.g. color:hsl(0,100%,60%)) (CSS3)
- HSL: Hue, Saturation and Lightness
- HWB values (CSS4)
Example
- Background Color
- <body style="background-color:powderblue;">
- Text Color
- <h1 style="color:blue;">This is a heading</h1>
- <p style="color:red;">This is a paragraph.</p>
- <span style="color:orange;">This is a paragraph.</span>
W3C
- CSS Snapshot 2017
- Cascading Style Sheets Level 2 Revision 2 (CSS 2.2) Specification
- Colors and backgrounds
Web Colors
https://en.wikipedia.org/wiki/Web_colors
X11 color names
https://en.wikipedia.org/wiki/X11_color_names
Colors - X11
https://www.w3schools.com/colors/colors_x11.asp
X11 color names
https://en.wikipedia.org/wiki/X11_color_names
Colors - X11
https://www.w3schools.com/colors/colors_x11.asp
W3Schools
- Colors Tutorial HTML Color Picker
- HTML Color Names
- https://www.w3schools.com/colors/colors_names.asp
- Demo
- https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_font_color_css
- HTML Color Shades (Shades of Gray)
HTML Color Codes
- Color Picker
- Color Names
MDN <color> - CSS: Cascading Style Sheets
https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
留言
張貼留言