Color Converter & Picker
Convert colours between HEX, HEXA, RGB, RGBA, HSL, HSLA, HSV, HSVA and CSS named colours. Pick a colour, adjust alpha, preview it on light and dark backgrounds and see its contrast ratio against white and black.
Convert colours between HEX, HEXA, RGB, RGBA, HSL, HSLA, HSV, HSVA and CSS named colours. Pick a colour, adjust alpha, preview it on light and dark backgrounds and see its contrast ratio against white and black.
Color Converter & Picker converts one colour into every common format at once: HEX and HEXA, rgb() and rgba(), hsl() and hsla(), HSV and HSVA, and the matching CSS named colour when one exists. You can type a value in any of these formats, use your browser’s colour picker, or edit the red/green/blue, hue/saturation/lightness or hue/saturation/value numbers directly. An alpha slider and number control transparency, and every output updates instantly.
A live preview shows the colour on a light and a dark background and as a background behind white or black text, which you can choose yourself or leave on automatic. The tool calculates the contrast ratio of the colour against pure white and pure black using the WCAG 2 relative-luminance formula. This is a calculated ratio for one colour pair; it does not show that a complete interface meets WCAG. Values outside their allowed ranges are rejected with a clear message rather than silently clamped. HSV is not a CSS function, so it is offered for design apps only.
HEX with 3, 4, 6 or 8 digits after #, rgb() and rgba() with numbers or percentages, hsl() and hsla(), hsv() and hsva(), and the 148 CSS named colours (plus transparent) that your browser supports. Both comma and space-separated syntax work, for example rgb(37, 99, 235) or rgb(37 99 235 / 0.5).
Out-of-range values, such as rgb(300, 0, 0) or hsl(200, 120%, 50%), are reported as errors so that mistakes are not hidden. Browsers clamp such values in CSS, which can make a typo hard to notice.
It uses the WCAG 2 relative-luminance formula for the colour at full opacity, compared with pure white and pure black. The result is a calculated ratio for that pair only; it does not prove that a page or app meets WCAG or any other accessibility standard.
HEX and RGB use whole numbers from 0 to 255, while HSL and HSV are shown to one decimal place. Rounding means converting back and forth can shift a value by a small fraction.
No. CSS supports HEX, rgb(), hsl() and several newer functions, but not hsv(). HSV (also called HSB) is common in design tools, so it is provided for those, and the .css download includes it only as a comment.
The browser’s native colour picker selects opaque colours only. Use the alpha slider or number field to set transparency, or type a HEXA, rgba(), hsla() or hsva() value.
No. All conversions run in your browser and nothing is stored.