HEX → RGB
Converts a hex color code to RGB and HSL.
This tool runs on JavaScript. To use it, turn on JavaScript in your browser and reload the page.
FROM #HEX TO RGB, INSTANTLY.
HEX → RGB converts a hexadecimal color code into RGB and HSL values. You can write the code with or without the hash; the three-digit short form (#f00), the six-digit standard form (#ff0000) and the eight-digit form carrying transparency (#ff0000cc) are accepted. The moment you type, the color preview updates and the results appear: RGB, RGBA if there is transparency, HSL, and a CSS variable you can paste straight into a style sheet.
The result list also tells you whether dark or light text should be put on this color; that suggestion is worked out from the perceived brightness of the color. If you want, you can pick a color from the color picker and take its code too. The tool works in both directions: when you change the RGB fields the HEX updates as well, which is why it shares a screen with “RGB → HEX”. It is used to take a code from a design program into code, to convert a brand color into different forms, or to work out whether a color is light or dark. The calculation is done entirely in your browser.
From start to finish
- Write the HEX code. For example #1a73e8, 1a73e8, or #17e in the short form.
- Look at the preview. The color box and all the values update the moment you type.
- Copy the value. Copy the RGB, HSL or CSS variable line and use it.
Frequently asked questions
What does #1a73e8 come to in RGB?
rgb(26, 115, 232). The first two digits give red, the next two green and the last two blue, in base sixteen.
What does an eight-digit HEX mean?
The last two digits are the transparency: ff is fully opaque, 00 fully transparent. #1a73e880 is a half-transparent blue and appears as RGBA in the result.
How is a short HEX (#f00) expanded?
Each digit is written twice: #f00 becomes #ff0000. The tool does that by itself.
Is the data I enter sent to the server?
No. This tool runs entirely in your browser; nothing you type or add is sent to the RUPO Studio server. It keeps working while the page is open even if your internet connection drops. No account needed. It is free to use: there is no hourly or daily limit, and we don't make you watch an ad before you see the result.
Other Creator Tools tools
RUPO Studio