Color Converter

Enter a color in any format — HEX, RGB, or HSL — and instantly see all three values.

What is color format conversion?

Colors on screens can be described in many different mathematical models, each with its own notation. Color format conversion means expressing the same exact color using a different notation system. A deep blue might be written as #2563eb in HEX, as rgb(37, 99, 235) in RGB, or as hsl(221, 83%, 53%) in HSL — all three describe the exact same hue. Different tools and contexts expect different formats, so being able to convert quickly saves time and prevents errors.

HEX vs RGB vs HSL explained

HEX encodes red, green, and blue as a six-character hexadecimal string prefixed with #. It is compact and universal, used in CSS, SVG, HTML attributes, and design tools like Figma. RGB (Red, Green, Blue) represents each channel as an integer from 0 to 255, making arithmetic adjustments intuitive — doubling the red value makes something redder. HSL (Hue, Saturation, Lightness) describes color in human-intuitive terms: hue is the angle on the color wheel (0–360°), saturation controls how vivid the color is (0–100%), and lightness controls how bright it is (0–100%). HSL makes it easy to create color palettes by adjusting only one dimension at a time.

How this tool works

Type a color value into any of the three input fields and the other two update instantly. Parsing logic handles flexible input: HEX accepts both 3-digit and 6-digit forms (with or without the # symbol), RGB accepts comma-separated or space-separated values, and HSL accepts percentages with or without the % sign. The preview rectangle above the inputs always shows the current color. All conversion math runs locally in your browser — no data is sent to a server.

Common use cases

Convert a HEX color from a brand style guide into RGB for use in a CSS rgba() rule with transparency. Translate an RGB value from a design handoff into HSL so you can generate lighter and darker tints. Check what a hex color code looks like visually before committing it to code. Build color palettes by fixing the hue in HSL and adjusting saturation and lightness. Verify that two apparently similar hex codes are actually the same color by comparing their RGB values.