Skip to content
PrivBay

Color converter for five formats

Enter one opaque sRGB color, preview it and copy the same color in five formats.

For opaque sRGB colors. Enter hue in degrees and other non-RGB channels as percentages without the percent sign.

Ready. This runs on your device.

How to convert HEX, RGB, HSL, HSV and CMYK colors

  1. Choose an Input format.
  2. Enter the HEX code or fill in the components for the chosen format.
  3. Select Convert color and use the Copy button beside the value you need.

Convert HEX to RGB, HSL, HSV and CMYK

Use this color converter and color code converter when a brand guide gives you an RGB value and your stylesheet expects HEX, or when you need HEX to HSL components to adjust the lightness of a design token. For HEX to RGB, paste a short 3-digit or full 6-digit hexadecimal code and read the RGB row. For RGB to HEX or RGB to CMYK, select RGB and fill in the red, green and blue channels. The preview shows the resulting color as an opaque sRGB swatch.

Format Example value Channel ranges Typical use
HEX #2563EB 00 to FF per channel CSS tokens, SVG fills and design handoff
RGB rgb(37, 99, 235) 0 to 255 (R, G, B) Screen rendering and canvas graphics
HSL hsl(221, 83%, 53%) Hue 0–360°, S and L 0–100% Building lighter or darker UI tints
HSV hsv(221, 84%, 92%) Hue 0–360°, S and V 0–100% Color pickers and paint software
CMYK cmyk(84%, 58%, 0%, 8%) 0% to 100% (C, M, Y, K) Approximate process-ink reference

Read the components and rounding

RGB describes the strength of each additive light channel. In HSL, lightness runs from black through the pure hue to white. In HSV, value tracks the brightest channel, so HSL lightness and HSV value differ for the same color. The CMYK row estimates cyan, magenta, yellow and key black percentages from sRGB. Rounded component values are convenient for CSS and design notes, though repeatedly converting rounded values can shift a channel slightly.

Put the result in context

Sample a pixel from a screenshot with the image color picker and paste its HEX value here. To find nearby or complementary harmonies, open the color palette generator. Before assigning a color to text or icons, verify the foreground and background pair with the contrast checker.

Frequently asked questions

Which HEX values work?

Use three or six hexadecimal digits with an optional #. For example, #f00 and #ff0000 both represent red.

What are the component ranges?

RGB channels run from 0 to 255. Hue runs from 0 to 360 degrees. Saturation, lightness, value and CMYK components run from 0 to 100 percent.

Can I convert transparent colors?

This converter uses opaque sRGB colors. Use a color already composited over its background if you need its visible appearance.

Can I use the CMYK value for a print proof?

The CMYK result uses a generic formula. A print proof needs the color profile for the printer, ink and paper.

Why is hue zero for gray?

A gray has no hue. The tool uses zero as a display value when saturation is zero.

Last updated November 11, 2026