CSS Color Converter

Convert between HEX and RGB color formats.

CSS Color Converter switches HEX colors to rgb() and rgb() values back to HEX for stylesheet consistency.

Input
Output

When to use CSS Color Converter

  • Matching design tokens across formats
  • Converting DevTools RGB readouts to HEX
  • Normalizing a palette before sharing

Example

Input

#0284c7

Output

rgb(2, 132, 199)

How to use

  1. Paste a color. Use #0284c7 or rgb(2, 132, 199).
  2. Convert. Run to switch to the other format.
  3. Apply in CSS. Paste the converted value into your rules.

Processing and limitations

Converts three- or six-digit HEX and comma-separated integer rgb() channels from 0 to 255. Alpha, percentages, HSL and other CSS color spaces are not accepted; transparency is never silently discarded.

Reference

Benefits

  • Free to use—no account required
  • Runs in your browser
  • Instant results with no software install
  • Basic processing does not upload your content to a server
  • Alpha/rgba channels are not the primary focus of this converter.

Not the same as

Gradient building is handled by CSS Gradient Generator.

Related tools