HEX to RGB
Convert CSS color names, HEX, RGB/RGBA, and HSL/HSLA to their sRGB values. Edit channels, preserve decimal alpha, inspect normalized values, and keep a local swatch collection.
How to Convert HEX to RGB and RGBA
Preview composited on white. HEX stores alpha in 8 bits; decimal alpha is retained in RGB and HSL.
#7D9065rgb(125, 144, 101)hsl(86.512 17.551% 48.039%)rgb(49.02% 56.471% 39.608%)0.4902, 0.5647, 0.3961, 1--color: #7D9065;Color names use standard CSS keywords, such as red or rebeccapurple.
HEX to RGB: how to use it
- Enter a valid HEX color, with or without #.
- Inspect RGB channels and alpha.
- Copy a value or edit the channels to convert back to HEX.
Limits and notes
RGB output uses 8-bit sRGB channels. Decimal alpha is preserved in RGB/HSL; HEX rounds alpha to the nearest 1/255 step. HSL input requires percentage saturation and lightness. Normalized/percentage displays are rounded. The 148 standard CSS color names and transparent are supported. Context-dependent system colors, currentcolor, relative colors, and calc() are unsupported. No color-space conversion is implied.
How your privacy works →HEX to RGB: common questions
What do four and eight HEX digits mean?
The last component represents alpha. For example, #0008 expands to #00000088: black with alpha 136/255.
Does HEX to RGB change the color?
No. HEX and RGB here describe the same sRGB channel values in different notation.
Can I enter RGB, HSL or a CSS color name?
Yes. Use the separate RGB or HSL field for supported comma or space/slash numeric forms, 148 CSS named colors or transparent. HSL text requires percent signs for saturation and lightness. The parser does not evaluate every CSS color expression.
How precise are normalized RGBA and percentage outputs?
Normalized RGBA displays up to four decimals; RGB percentage and HSL channel output use up to three. The Alpha number control displays up to six decimals. RGB/HSL output retains stored decimal alpha; HEX rounds alpha to one byte.