Jump to content
  • Advertisement
Sign in to follow this  
kag1

[web] CSS and Color Codes

This topic is 4774 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I'm pretty sure most all hhtml color codes are a 6 place hexidecimal number.. I'm wondering what the codes are that are only 3 places..for example I'm looking at a webpage with the color set to color:#135; ..now I know this must be hex..but I can't find any converter that will convert that will convert it to RGB without other 3 digits.. 000135 and 135000 wouldn't be it either...hrmmm?

Share this post


Link to post
Share on other sites
Advertisement
#135 is the same as #113355, which is the same as rgb(17, 51, 85)

Edit:
Quote:

From the CSS1 spec
The three-digit RGB notation (#rgb) is converted into six-digit form (#rrggbb) by replicating digits, not by adding zeros. For example, #fb0 expands to #ffbb00. This makes sure that white (#ffffff) can be specified with the short notation (#fff) and removes any dependencies on the color depth of the display.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!