Color conversion
RGB to Hex Converter with RGBA, HSL & OKLCH
Convert RGB and RGBA values to Hex, Hex8, HSL, HSV and OKLCH instantly for CSS, design tokens and UI color systems.
Result
How to use this tool
Enter red, green and blue channel values from 0 to 255. The converter updates Hex, eight-digit Hex, HSL, HSV and OKLCH immediately and keeps alpha transparency when supplied.
- 1 Enter the red, green and blue values.
- 2 Optionally adjust the alpha transparency.
- 3 Copy Hex, Hex8, HSL, HSV or OKLCH output.
Frequently asked questions
What RGB values are valid?
Each red, green and blue channel uses a value from 0 to 255. Alpha uses a value from 0 to 1.
Does Hex support transparency?
Yes. Eight-digit Hex adds a final two-digit alpha channel, such as #33669980.
Can I convert RGBA to Hex?
Yes. When alpha is below 1, the tool outputs an eight-digit Hex code so transparency can be preserved in CSS.
Why show OKLCH as well as Hex?
Hex is compact for CSS, while OKLCH is useful when you need more perceptually consistent color adjustments.