Color Picker & Converter

HEX, RGB, HSL color conversion tool.

Developer Tools
Tool Area
Visual Color Swatch
HEX Code
RGB Representation
HSL Representation
Color Coordinates Adjuster
RGB Color Channels
R (26)
G (107)
B (60)
HSL Color Dimensions
Hue (145°)
Sat (61%)
Light (26%)

About this tool

Formatting color coordinate conversions cleanly across multiple design parameters (HEX, RGB, HSL) is a baseline requirement when designing stylesheets, templates, and UI systems. Our Color Picker features real-time canvas coordinate updates.

Color Coordinate Conversion Formulations

Transforming RGB values into the standard HSL (Hue, Saturation, Lightness) space model involves scaling variables proportionally, locating boundaries based on chromatic maximum and minimum limits:

max = max(R, G, B),   min = min(R, G, B),   d = max - min
L = (max + min) / 2

If the maximum and minimum parameters are equal (max = min), the color is a grayscale value, meaning the hue and saturation remain at 0. For chromatic configurations, the Saturation (S) is calculated:

S = L > 0.5 ? d / (2 - max - min) : d / (max + min)

This mathematical translation allows developers to coordinate color systems mathematically without manual adjustments.

Frequently asked questions

Everything you need to know about Color Picker & Converter.

What color formats does the color picker support?

The tool supports HEX (#RRGGBB), RGB (rgb(r, g, b)), HSL (hsl(h, s%, l%)), and HSB/HSV. Values are converted between all formats in real time as you adjust the picker, so you always have the representation you need.

Can I enter a specific HEX code and see it in all formats?

Yes. Type or paste any valid HEX code into the HEX input field and the picker, RGB sliders, and HSL values all update instantly. Shorthand 3-digit HEX codes (e.g. #F0A) are also supported and expanded automatically.

How is HSL different from RGB?

RGB defines colour by mixing red, green, and blue light intensities — intuitive for screens but not for human design thinking. HSL (Hue, Saturation, Lightness) maps more naturally to how people perceive colour: hue is the colour angle on the wheel, saturation is its intensity, and lightness is how bright or dark it is. HSL makes it easy to create colour palettes by adjusting just one value.

Does the tool check contrast ratios for accessibility?

The picker shows real-time contrast ratio calculations between the selected foreground colour and common backgrounds (white and black), indicating whether the combination passes WCAG AA (4.5:1 for normal text) or AAA (7:1) standards.

Is my colour data sent to a server?

No. All colour calculations and conversions are pure client-side mathematics. No data leaves your browser.

Related tools