The Wayback Machine - https://web.archive.org/web/20060501115345/http://www.web-colors-explained.com:80/hex_03.php
Visit Web-Colors-Explained.com: Guide to Hexadecimal Numbers May 01, 2006 Understanding Hexadecimal Numbers
 May 01, 2006

Guide to Hexadecimal Numbers

Converting Decimal Numbers to Hexadecimal Numbers

When dealing with web colors, it's sometimes handy to know what the decimal equivalent of an RGB value. The need to convert numbers back to hex isn't likely to arise as often but why not...

The most common way to convert to hex is repeated division by the base number, 16. Start by dividing the number you want to convert by 16. The remainder becomes the Least Significant Figure (the right-most digit) in the hexadecimal equivalent. Then take the quotient and divide it by 16. The remainder becomes the next significant so write it down to the left of the last remainder. Keep dividing each successive quotient until zero is reached.

For example,
1250

DivisionQuotientRemainderHex
1250/16 78 2 2
78/16 4 14 (E) E2
4/16 0 4 4E2

Using the dollar ($) sign notation to represent hexadecimals. It can be said that from this conversion, the following is true:
1250 = $4E2



Navigate this article:
Intro | 1 | 2 | 3 | 4

    Introduction to Web Colors

    The RGB Color System

    The CMYK Color System

    The HSB Color System

    Hexadecimal Guide

            Hexadecimal vs Decimal

           Converting Hexadecimals

          Converting Decimals

           Hexadecimal Arithmetic


    Web Colors Forum

 

Do you like tattoo designs

> Advertise Here <


Web Colors Explained | About | Newsletter | Contact Us | Privacy | Terms of Use | Advertising | Links

Copyright © 2006 Web-Colors-Explained.com Web Colors Explained: Guide to Hexadecimal Numbers All rights reserved. All product or brand names are trademarks of their respective owners.