• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 16. Specifying Color in HTML > Specifying Color by RGB Values

16.1. Specifying Color by RGB Values

The most common and precise way to specify a color in HTML is by its numerical RGB (red, green, blue) values. For an explanation of RGB color, see Section 3.3 in Chapter 3.

Once you've identified the red, green, and blue values of your chosen color (an image-editing tool helps with this task), you need to translate them to their hexadecimal equivalents in order to enter them into the HTML color tag. These values are written in HTML with the following syntax:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint