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

Chapter 15. Bookmarklets > Converting RGB Values to Hex

Converting RGB Values to Hex

Another handy little widget Web developers frequently wish they had on hand is an RGB-to-hexadecimal converter. This is useful whenever you need to translate a color value from a graphics program like Photoshop or Fireworks into a browser color, for page backgrounds or text colors. Script 15.10 shows the conversion calculator done in JavaScript and turned into a bookmarklet.

Script 15.10. This script takes RGB color values, and turns them into their hexadecimal equivalents.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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