Numeros
Categories Financial Calculators Health Calculators Math Calculators Date & Time Construction Engineering Physics Business Education Lifestyle Converters Generators
About

Color Converter (HEX/RGB)

Convert a color between HEX and RGB formats, with a live preview swatch - useful for web design and CSS.

Color Converter

Live
CSS values
rgb(25, 85, 221)

How this works

HEX = two-digit base-16 value for each of Red, Green, Blue (00-FF = 0-255)
Example

RGB(25, 85, 221) converts to #1955DD - each value converted to base-16 and joined together.

Step-by-step guide

  1. Enter a HEX code (with or without the #), or enter RGB values directly.
  2. The other format and the color swatch update automatically.

Common mistakes

Entering a 3-character shorthand HEX code (like #FFF) - this converter expects the full 6-character form (like #FFFFFF).
Entering RGB values above 255 - each channel is capped at 255, the maximum for 8-bit color.

Frequently asked questions

What's the difference between HEX and RGB?

They represent the same color information differently - HEX is a compact base-16 string commonly used in CSS and design tools, while RGB spells out the red, green, and blue values as separate base-10 numbers.

Does this support transparency (alpha)?

No - this covers standard 6-character HEX and RGB only. For transparency, CSS supports an added alpha value (RGBA or an 8-character HEX) on top of these same values.

Can I use the shorthand 3-digit HEX format?

Not directly in this tool - expand it first by doubling each character (like #FFF becomes #FFFFFF) before entering it here.

Related calculators

See the full list of Converters, or try: