HTML Colours
HTML colours are used to define the colour of text, background, borders,
and other elements on a web page. There are three main ways to
represent colours in HTML:
2. Hexadecimal Colour Codes:
These codes use a combination of six hexadecimal digits (0-9, A-F)
to represent the intensity of red, green, and blue components of a
colour.
The format is #RRGGBB, where RR represents the red component,
GG represents the green component, and BB represents the blue
component.
Each component can range from 00 to FF (0 to 255 in decimal).
Examples:
o #FF0000 (red)
o #00FF00 (green)
o #0000FF (blue)
o #FFFF00 (yellow)
o #000000 (black)
3. RGB Colour Values:
These values specify the intensity of red, green, and blue
components using decimal numbers.
The format is RGB (R, G, B), where R, G, and B represent the red,
green, and blue components, respectively.
Each component can range from 0 to 255.
Examples:
o rgb(255, 0, 0) (red)
o rgb(0, 255, 0) (green)
o rgb(0, 0, 255) (blue)
o rgb(255, 255, 0) (yellow)
o rgb(0, 0, 0) (black)
HTML Colours Huzaifa Nazir 8.D
HTML Colours Huzaifa Nazir 8.D