Microsoft Paint uses the RGB colour model, which represents values for the red, green and blue components of a colour as a decimal number between zero and 255, allowing 16.7 million different colour combinations. The HTML standard also uses the RGB colour model, but represents each component value using hex instead of decimal. This allows a range of values from zero to FF for each component, where hex FF equals decimal 255. Convert the decimal colour values from Paint into their equivalent hex values using the Windows Calculator to use a colour in an HTML page.
- Skill level:
Click on the Windows "Start" button, and then "All Programs." Click on the "Accessories" folder to open, and then click on "Paint" to launch Microsoft Paint.
Click on the "Edit Colors" button on the main tool bar to open the colour picker dialogue box.
Click on the colour you want to convert to hex format, and note the red, green and blue values in the boxes in the bottom-right of the dialogue box.
Click on "Calculator" from the "Accessories" group in the Windows "Start" menu to open the Windows Calculator. Click on the "View" menu, and select "Programmer" if you are using the Windows 7 calculator, or "Scientific" for other versions of Windows. The interface will change, and you will see buttons for the various number bases, "Dec", "Hex", "Oct" and "Bin." Click on "Dec" for decimal mode if not already selected.
Type in the red component value from the Paint colour picker, then click on the "Hex" button to select. The hex equivalent of the number is shown. For example, decimal 200 converted to hex is displayed as C8.
Click on the "Dec" button to switch to decimal mode, and then enter the green component value. Click the "Hex" button to convert to the hex equivalent. Repeat to display the hex equivalent for the blue component value.
Put the three hex codes for the red, green and blue values together to create the HTML colour code. For example, red 54, green 193 and blue 201 would give an HTML colour code of "#36C1C9." Note that HTML hex colour codes always start with the "#" character. The colour code can then be used in an HTML page.
Tips and warnings
- Online converters are available which make it easier to convert decimal RGB values to hex.
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for