RGB to HEX Converter
Convert RGB color values to Hexadecimal strings instantly. Includes advanced features like palette generation, contrast checking, and color blindness simulation.
RGB Input
Supports: rgb(), rgba(), comma-separated, percentages
HEX Output
Color Palette
Contrast Checker
WCAG 2.0 AA/AAA compliance check.
Color Blindness Sim
Recent Colors
About RGB to HEX Conversion
How it works
RGB (Red, Green, Blue) is an additive color model in which red, green, and blue light are added together in various ways to reproduce a broad array of colors. HEX (Hexadecimal) is a 6-digit representation of a color. The first two digits (RR) represent the red value, the next two (GG) the green, and the last two (BB) the blue.
Conversion Formula
HEX = # + R.toString(16) + G.toString(16) + B.toString(16)
Input Formats Supported
- Standard RGB: rgb(255, 0, 0)
- RGBA: rgba(255, 0, 0, 1) (Alpha is ignored for HEX)
- Raw Values: 255, 0, 0
- Space Separated: 255 0 0
- Percentages: 100%, 0%, 0%