Color Converter

By: Calculator Grid

Color converter

Convert one sRGB color between RGB, Hex, HSL, HWB, CMYK, and NCol notation while keeping every displayed value synchronized.

Hex #6E28C8 Hue 266.25° Brightness 47.06%

Input color

Select the notation that matches the value you already have.
Integer from 0 to 255.
Integer from 0 to 255.
Integer from 0 to 255.
Ready. The demonstration color and its workbook are valid.

Converted color

Hex
#6E28C8
RGB
rgb(110, 40, 200)
HSL
hsl(266.25°, 66.67%, 47.06%)
HWB
hwb(266.25°, 15.69%, 21.57%)
CMYK
cmyk(45.00%, 80.00%, 0.00%, 21.57%)
NCol
B43.75, 15.69%, 21.57%
Hex #6E28C8; RGB 110, 40, 200.

Conversion details

Color model Component meaning Converted value
RGB Red, green, and blue light channels 110, 40, 200
Hex Six hexadecimal digits for sRGB #6E28C8
HSL Hue, saturation, and lightness 266.25°, 66.67%, 47.06%
HWB Hue, whiteness, and blackness 266.25°, 15.69%, 21.57%
CMYK Cyan, magenta, yellow, and key 45.00%, 80.00%, 0.00%, 21.57%
NCol Natural hue code, whiteness, and blackness B43.75, 15.69%, 21.57%
The converter uses standard mathematical transforms within the sRGB color space. CMYK values are a device-independent arithmetic approximation; a real print workflow may produce different ink recipes after color-profile conversion.

How to use the color converter

What this calculator does

This calculator translates one color among six common notations: RGB, Hex, HSL, HWB, CMYK, and NCol. It is useful when a color arrives in one format but a design tool, stylesheet, print brief, or documentation system expects another. The calculator treats the color as an sRGB value, then derives every other notation from the same canonical red, green, and blue channels. It provides exact mathematical identities for RGB, Hex, HSL, HWB, and NCol within that model. The CMYK result is an arithmetic approximation rather than a printer-specific proof, because professional print conversion depends on paper, ink, press behavior, rendering intent, and an ICC profile.

When to use it

Use the tool when translating a brand color from a Hex code into editable HSL controls, checking an RGB triplet before placing it in CSS, preparing a rough CMYK estimate for a print conversation, or comparing how one color is represented by hue-based systems such as HSL and HWB. The W3C CSS Color Module explains the standardized web color syntaxes behind RGB, Hex, HSL, and HWB.

How to calculate

  1. The calculator opens with the complete demonstration color RGB 110, 40, 200. Its results and an immediately usable Excel workbook are already prepared.
  2. Choose a color encoding to input. The visible fields change to match RGB, Hex, HSL, HWB, CMYK, or NCol.
  3. Replace the sample or enter a complete value in the selected notation. Results update live after every valid edit.
  4. Read the large Hex result, the color preview, the five secondary conversion cards, and the Conversion details table.
  5. Select Download Excel to create a current-state .xlsx workbook with Summary, Inputs, and Conversions sheets. Reset clears all data and results; after Reset, Excel stays disabled until a complete valid color is entered again.

Input guide

Choose a color encoding to input is required and determines which fields are active. RGB uses Red (R), Green (G), and Blue (B), each as an integer from 0 through 255; 110, 40, 200 is a valid example. Higher channel values add more of that emitted light. Do not enter percentages or scientific notation. Hex code accepts #RRGGBB or #RGB, such as #6E28C8; the leading # is optional, but exactly three or six hexadecimal digits are required.

HSL uses required Hue in degrees from 0 through 360, plus required Saturation and Lightness percentages from 0 through 100. For the sample, 266.25, 66.67, and 47.06 reproduce the same purple. Hue wraps around the color wheel conceptually, but this interface requires the stated range. Saturation 0 produces gray regardless of hue; lightness 0 is black and 100 is white. Do not paste degree or percent symbols into these numeric fields.

HWB uses required Hue, Whiteness, and Blackness. Whiteness and blackness are percentages from 0 through 100, and their sum may not exceed 100. Increasing whiteness mixes the hue toward white; increasing blackness moves it toward black. CMYK uses required Cyan, Magenta, Yellow, and Key (black), each from 0 through 100 percent. A value such as 45, 80, 0, 21.57 is valid for the sample. Do not treat this arithmetic CMYK value as a press-ready profile conversion.

NCol uses required NCol hue, Whiteness, and Blackness. The hue begins with R, Y, G, C, B, or M followed by a number from 0 through 100, such as B43.75. Whiteness and blackness follow the same range and sum rule as HWB. A common mistake is entering an ordinary word or a Hex code in the NCol hue field.

Output guide

Hex is the primary result and shows the six-digit sRGB code. RGB gives the exact integer light channels. HSL reports hue in degrees plus saturation and lightness percentages. HWB reports hue, whiteness, and blackness. CMYK reports the calculated cyan, magenta, yellow, and key percentages. NCol expresses the same hue as a letter-sector code with whiteness and blackness. The header pills repeat Hex, Hue, and Brightness; in this calculator, Brightness is the HSL lightness value, not a physical luminance measurement. The preview is a visual aid, while the Conversion details table names each model, explains its components, and repeats the current value. Zero and boundary values are valid when they satisfy the selected model: RGB 0,0,0 is black, RGB 255,255,255 is white, and HSL saturation 0 is achromatic.

Worked example

For the startup RGB values 110, 40, and 200, the hexadecimal channel pairs are 6E, 28, and C8, so the primary result is #6E28C8. Normalizing the channels gives approximately 0.4314, 0.1569, and 0.7843. The maximum and minimum channels produce an HSL hue of 266.25°, saturation of 66.67%, and lightness of 47.06%. HWB uses the same hue with whiteness equal to the minimum normalized channel, 15.69%, and blackness equal to one minus the maximum channel, 21.57%. The arithmetic CMYK conversion is 45.00%, 80.00%, 0.00%, and 21.57%. Every displayed result and the startup workbook use these same canonical values.

How the color models differ

RGB and Hex are direct sRGB encodings, so they are especially practical for screens and web development. Hex is compact, while RGB makes the three channels explicit. HSL rearranges the same sRGB information into controls that often feel more intuitive for adjusting hue, intensity, and light-dark balance. HWB describes a hue with added white and black, which can be convenient for generating tints and shades. The MDN guide to CSS color values provides practical syntax examples and browser-focused explanations.

CMYK is fundamentally associated with subtractive printing rather than emitted screen light. The simple formula here converts sRGB to a normalized four-channel estimate, but it cannot model a specific press. For production work, use a color-managed application and the correct output profile. The International Color Consortium sRGB characterization page describes the standard RGB space used as this calculator's base.

Formula notes and common mistakes

Hex converts each RGB channel to a two-digit base-16 number. For CMYK, K = 1 – max(R′, G′, B′); when K is below 1, C = (1 – R′ – K) / (1 – K), with corresponding formulas for M and Y.

Do not compare component numbers across models as though they were the same unit. A hue of 266.25° is not “larger” than a blue channel of 200 in any visual-intensity sense. Avoid rounding intermediate values before finishing a conversion, because premature rounding can change the final displayed percentages. Also remember that identical numeric definitions can look different on uncalibrated displays. For accessibility decisions, color conversion alone is not enough; contrast must be evaluated against a specific foreground and background. The W3C explanation of minimum contrast describes that separate requirement.