One color in several useful formats
Paste a color and convert it, choose a base color with the visual picker, or browse the full set of 148 fixed CSS named colors. HEX accepts 3, 4, 6 or 8 digits with an optional #. Four- and eight-digit forms put alpha last: #33669980 has opacity 128/255, slightly more than 50%.
RGB accepts decimal channels, percentages, legacy commas or modern spaces with / alpha. Legacy comma-separated RGB must use either all numbers or all percentages. HSL supports degrees, radians, gradians and turns; hue wraps around a full circle. HWB mixes a hue with white and black. If HWB whiteness plus blackness reaches 100%, the result is a normalized gray.
Transparency and rounding
The checkerboard shows transparency; the white and black previews show why a translucent color looks different on different backgrounds. Hidden RGB channels are retained even when opacity is zero. The keyword transparent specifically means transparent black.
RGB, HSL and HWB output values are rounded to six decimal places. HEX uses whole 8-bit RGB and alpha values, so it can change fractional channels or opacity; the result identifies when that occurs. For example, rgb(51 102 153 / .5) becomes #33669980, whose alpha is approximately .501961. Use the decimal RGB output when that distinction matters.
The visual picker selects 8-bit RGB. The opacity slider and percentage field change alpha without replacing the base color. The percentage field accepts decimal values; Apply opacity updates the result and Undo restores the prior color. Grays have no meaningful hue; this tool writes 0 degrees. JSON stores browser numeric channel values and the original input, while the displayed and CSS formats use the stated precision.
Supported color space and syntax
This tool converts fixed, in-range sRGB values. RGB channels must be 0–255 or 0–100%; HSL saturation/lightness, HWB whiteness/blackness and opacity must stay in their stated ranges. It rejects out-of-range inputs rather than silently clipping them. Hue values are limited to ±1 billion in the chosen angle unit; text input is limited to 256 characters.
Wide-gamut Display P3, Lab, LCH, Oklab, relative colors, color-mix(), calc(), variables, system colors, currentColor and missing components such as none are outside this converter’s scope. No CMYK printing-profile or monitor-calibration accuracy is implied. Browser previews depend on your display.
Copy, export and recover
Copy each format individually, download CSS custom properties, or save the JSON record. Example, named-color choices, clear and visual adjustments keep one previous state for Undo; typing ends that history. Editing color text hides stale results until conversion. No color values are uploaded or saved automatically.
References: CSS Color Module Level 4, RGB syntax and HSL syntax. Named-color data is derived from color-name 1.1.4; its MIT license is included.