Find out the hex code of a color with Paint
In this practical tip we explain how you can find out the hex code of a color using Paint. The hex code of a color is required, for example, for web programming with HTML.
1. Use the "Color Picker" tool to select the appropriate color
Open the picture from which you want to find out the hex code of a color. Then proceed as follows:
- In the "Start" tab under "Tools" select the "Color selection" tool (see screenshot).
- Click on the appropriate place (color) in the image to select the color. Then go to step two.
2. Find out the RGB values of the color
The colors in Paint are specified by default in RGB (red-green-blue) values. You can use these values to find out the hex code of the corresponding color. To do this, proceed as follows:
- After selecting the color using the color picker tool, click "Edit Palette" in the top right corner of the "Home" tab.
- At the bottom right you will find the decimal values for the red, green and blue values of the color (see screenshot). In our example we get the values red 89, green 132 and blue 189.
- Write down these values and go to step three.
3. Convert the decimal values to hexadecimal values
The RGB values of the color are decimal values. To find out the color's hex code, you need to convert it. You can find a conversion tool here. To convert the RGB values, proceed as follows:
- Enter the red value of the color under "Value" in the conversion tool and click on "dec -> hex". Write down the value. In our example: 81 decimal -> 51 hexadecimal
- Then enter the green value of the color under "Value" and click on "dec -> hex". Write down the value. In our example: 132 decimal -> 84 hexadecimal
- Then enter the blue value of the color under "Value", click on "dec -> hex" and note the value. In our example: 189 decimal -> BD hexadecimal
4. This is how the hex code of the color is composed
The individual hexadecimal values of the color put together result in the hex code. In some cases, the hex code is indicated with a diamond. In our example, the color hex code is: # 5184BD
These instructions refer to Paint under Windows 7. The procedure is the same under Windows XP, however the arrangement of the tool selection and the color palette is different. The tool selection can be found on the left; the color palette is called up in the menu bar via "Colors" -> "Edit colors".