Color Converter

Convert colors between HEX, RGB, HSL, and HSV formats. Live color preview included.

Runs in your browser · Data never leaves your device

Preview

#

What is a Color Converter?

Colors in digital design can be expressed in multiple formats: HEX (#ff6b35), RGB (rgb(255, 107, 53)), HSL (hsl(18, 100%, 60%)), and HSV/HSB. Each format is used in different contexts — HEX and RGB are common in CSS and code, HSL is preferred for programmatic color manipulation (it separates hue, saturation, and lightness intuitively), and HSV is used in many design tools. This Color Converter instantly converts any color between all four formats with a live preview, letting designers and developers work seamlessly between code and design tools.

How to use this tool

  1. Enter a color value in any format — HEX (#rrggbb), RGB (r, g, b), or HSL (h°, s%, l%) — in the corresponding input field.
  2. All other format fields update instantly to show the equivalent color value.
  3. The live color swatch updates to show the actual color.
  4. Click any color field to select and copy the value.
  5. Use the color picker to visually select a color if you prefer a graphical interface.

Common use cases

  • Converting a HEX color code from a design file to RGB for use in CSS gradients or canvas APIs
  • Converting HSL values from a style guide to HEX for legacy browser compatibility
  • Identifying the exact color values of a brand color across different tools and formats
  • Translating colors between Figma (uses HSB), CSS (uses HEX/RGB/HSL), and SVG
  • Finding the complementary or analogous colors by adjusting the HSL hue value
  • Checking the exact numeric values of colors when designing accessible color palettes

Frequently asked questions

What is the difference between HEX, RGB, and HSL?
HEX is a compact 6-digit representation of RGB values in base-16 (hexadecimal). RGB expresses the red, green, and blue channel values as integers from 0 to 255. HSL represents a color by its Hue (angle on a color wheel, 0–360°), Saturation (intensity, 0–100%), and Lightness (brightness, 0–100%). HEX and RGB are mathematically equivalent; HSL is a more perceptually intuitive model.
What is the difference between HSL and HSB/HSV?
HSL (Hue, Saturation, Lightness) and HSB/HSV (Hue, Saturation, Brightness/Value) are similar but different color models. In HSL, full white is L=100% and full black is L=0%, with pure colors at L=50%. In HSB, full brightness (V=100%) with S=100% gives a pure saturated color. Design tools like Photoshop and Figma typically use HSB, while CSS uses HSL.
What does the # symbol mean in a HEX color code?
The # prefix simply identifies the value as a HEX color code in CSS and HTML. The 6 characters after it are three pairs of hexadecimal digits representing the red (RR), green (GG), and blue (BB) channels from 00 (0) to FF (255).
What is alpha / opacity and why is it not shown here?
Alpha is a fourth channel (0–1 or 0–100%) representing transparency. In CSS it appears as rgba(r,g,b,a) or hsla(h,s%,l%,a) or 8-digit HEX (#rrggbbaa). This tool focuses on the three-channel opaque color formats; the fourth alpha channel can be appended manually once you have the base color.