Colors Tutorial

Learn JSON  Learn W3.JS  Web Templates  Learn XML DOM  W3.JS Reference  W3.JS Examples  Colors HOME  Color Names  Color Values  Color Groups 

Colors are displayed combining RED, GREEN, and BLUE light.

With CSS, colors can be set by using color names:

With CSS, colors can be specified in different ways:

RGB color values are supported in all browsers.

An RGB color value is specified with: rgb(red, green, blue).

Each parameter (red, green, and blue) defines the intensity of the color as an integer between 0 and 255.

For example, rgb(0,0,255) is rendered as blue, because the blue parameter is set to its highest value (255) and the others are set to 0.

Shades of gray are often defined using equal values for all the 3 light sources:

Hexadecimal color values are also supported in all browsers.

A hexadecimal color is specified with: #RRGGBB.

RR (red), GG (green) and BB (blue) are hexadecimal integers between 00 and FF specifying the intensity of the color.

For example, #0000FF is displayed as blue, because the blue component is set to its highest value (FF) and the others are set to 00.

Shades of gray are often defined using equal values for all the 3 light sources:

You can use upper case or lower case letters to specify hexadecimal values.

Lower case are easier to write. Upper case are easier to read.

CSS supports 140 standard color names.

In the next chapter you will find a complete alphabetical list of color names with hexadecimal values:

Tabs
Dropdowns
Accordions
Convert Weights
Animated Buttons
Side Navigation
Top Navigation
Modal Boxes
Progress Bars
Parallax
Login Form
HTML Includes
Google Maps
Range Sliders
Tooltips
Slideshow
Filter List
Sort List

HTML, CSS, JavaScript, PHP, jQuery, Bootstrap and XML.

Your message has been sent to W3Schools.

  1. By color names
  2. As RGB values
  3. As hexadecimal values
  4. As HSL values (CSS3)
  5. As HWB values (CSS4)

colorpicker

W3Schools.com