Hex to RGB Converter
Type a HEX color code and see its red, green and blue values at once. Short three-digit codes are expanded for you, and you can copy the result as CSS rgb() or as a Power Fx RGBA() formula for Power Apps.
Also known as: hex to rgb converter, convert hex to rgb, hex color to rgb, hex code to rgb.
Tip: three-digit HEX codes such as #0F8 work too.
#742774
rgb(116, 39, 116)
#742774rgb(116, 39, 116)RGBA(116, 39, 116, 1)Your data is processed locally in your browser and is not uploaded to our servers.
Features
- Accepts 3-digit and 6-digit HEX codes
- Live color preview
- Copy rgb() and RGBA() with one click
- Shows how readable white and black text is on the color
How to use the Hex to RGB Converter
- Type or paste a HEX code into the HEX box.
- Read the red, green and blue values.
- Copy the format you need.
Using HEX colors in Power Apps
Brand guides and design tools usually hand you HEX codes, but Power Apps canvas apps set colors with the RGBA() function. Paste the HEX code here and copy the ready-made RGBA() formula straight into a Fill, Color or BorderColor property.
Power Apps can also read HEX text with ColorValue("#742774"). That is handy when colors are stored as text in Dataverse or SharePoint, but RGBA() is easier to read and lets you change the alpha (transparency) value directly.
For model-driven apps and Power Pages, CSS accepts both forms, so you can use either the HEX code or the rgb() value in your stylesheet.
Example input and output
Pure red
#FF0000 -> rgb(255, 0, 0)
Short HEX code
#0F8 -> #00FF88 -> rgb(0, 255, 136)
Frequently asked questions
What does each pair of HEX digits mean?
The first pair is red, the second is green and the third is blue. Each pair runs from 00 (none) to FF (full, which is 255).
Does it support 3-digit HEX codes?
Yes. A short code such as #0F8 is expanded to #00FF88 first.
How do I convert HEX to RGB by hand?
Split the code into three pairs and convert each pair from base 16 to base 10. For #742774: 74 is 7×16+4 = 116, 27 is 2×16+7 = 39 and 74 is 116 again, so the result is rgb(116, 39, 116).
How do I use a HEX color in Power Apps?
Either copy the RGBA() formula from this tool, for example RGBA(116, 39, 116, 1), or wrap the HEX text in ColorValue, for example ColorValue("#742774"). Both work in any color property.
What about 8-digit HEX codes with transparency?
The last two digits are the alpha channel. This converter works with 3- and 6-digit codes; for transparency in Power Apps set the fourth RGBA() argument between 0 and 1.