RGB to Hex Color Converter — Instant Decimal ⇄ Hex Conversion

Convert RGB decimal values to hex color codes and back, instantly and for free — handy for CSS, design tools, and quick color code lookups.


Decimal (Base 10)

R
G
B


Hex (Base 16)

#

Tips

  • In CSS you can specify colors in both #RRGGBB and rgb(R, G, B) formats.
  • Each channel — R (red), G (green), B (blue) — ranges from 0 to 255 (00 to FF in hex).
  • White is #FFFFFF (255, 255, 255) and black is #000000 (0, 0, 0).
  • Design tools like Figma and Adobe XD support both formats, so you can copy a value and use it directly.
  • The shorthand #FFF is equivalent to #FFFFFF (white) and is valid CSS.

FAQ

Each channel — R, G, and B — accepts integers from 0 to 255, which corresponds to 00 to FF in hexadecimal.

No — #FFFFFF and #ffffff are treated identically in CSS. Hex color codes are case-insensitive.

Shorthand is only valid when each channel's two digits are identical (e.g. #RRGGBB#RGB). A value like #1DA1F2 cannot be shortened.
ツールくん

Side Note — The Mystery of Color: The Human Eye and 16.7 Million Colors

The human eye is estimated to distinguish about 10 million colors (individual variation applies). 24-bit RGB color (8 bits per channel) can represent 16,777,216 colors — far exceeding human perceptual limits.

Famous brand colors in RGB: Twitter Blue #1DA1F2 (29, 161, 242), Google Red #EA4335 (234, 67, 53), LINE Green #00B900 (0, 185, 0). Tiffany's iconic blue — Tiffany Blue — is close to #0ABAB5 and is one of the few trademarked colors in the world.

An interesting story: CSS has a named color called rebeccapurple (#663399). It was proposed by the CSS community as a tribute to Rebecca, the 6-year-old daughter of CSS specification author Eric Meyer, and officially adopted in 2014. It remains a deeply remembered story in the engineering community.