OurPaisa Tools

Color Converter

Convert colors between HEX, RGB and HSL in any direction -- edit any value and the others update instantly, with validation and one-click copy. Runs entirely in your browser.

HEX

RGB

HSL

HEX
RGB
HSL

How it works

Type into any of the three groups -- HEX, RGB or HSL -- and the other two update instantly, along with the color preview and ready-to-paste CSS values. If a value is out of range or not a valid code, that group is highlighted with a clear message and the last valid color is kept. RGB channels run from 0 to 255; HSL uses hue in degrees and saturation and lightness as percentages. Everything runs locally in your browser.

Is my data sent to any server?

No. The color converter runs entirely in your browser. Nothing you enter is uploaded, stored, or included in analytics.

Why might HSL values change slightly after converting?

HEX and RGB store whole numbers from 0 to 255 per channel, so converting an HSL color to HEX rounds it to the nearest representable color. Converting that HEX back to HSL can give values that differ by a fraction of a percent -- the colors look identical.

Which formats can I enter?

HEX codes with 3 or 6 digits (with or without #), RGB values from 0 to 255 for each channel, and HSL values with hue in degrees and saturation and lightness from 0 to 100%. Hue values outside 0-360 wrap around, so 370 is the same as 10.

How do I use the results in CSS?

Copy the value you need -- #4F46E5, rgb(79, 70, 229) or hsl(243, 75%, 59%) -- and paste it into any CSS color property. All three are supported by every modern browser.

More creator utilities are in our Creator Tools. See our Privacy Policy and Terms of Use for more detail.