Colors specification methods - HTML

Q.  What are the methods used to specify colors in HTML?
- Published on 26 Aug 15

a. RGB colors
b. Color names
c. Hexadecimal colors
d. All of the above

ANSWER: All of the above
 

    Discussion

  • Nirja Shah   -Posted on 10 Nov 15
    - All these methods of specifying colours support the major browsers.

    Hexadecimal Colours
    - These colour values are supported in all major browsers.

    - It is specified with: #RRGGBB, where the RR (red), GG (green) and BB (blue) hexadecimal integers specify the components of the colour. All values must be between 00 and FF.

    RGB Colours
    - It is specified with: rgb(red, green, blue). Each parameter (red, green, and blue) defines the intensity of the color and can be an integer between 0 and 255.

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

    Colour Names
    - There are 140 standard colour names which are supported by all major browsers.

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)