Skip to content
hexcolorcodepicker.com

Color Converter

Nearest CSS name

dodgerblue — nearest name

HEX: #3B82F6

Edit in any format — all fields stay in sync

RGB (0–255)

HSL (0–360, 0–100, 0–100)

HSV (0–360, 0–100, 0–100)

CMYK (0–100, approximate)

OKLCH (L 0–1, C 0–0.4, H 0–360)

CMYK is approximate — proof before printing. Rounding can shift one or two RGB channels by 1 on a round trip; HEX stays the source of truth.

  • HEX

    #3B82F6

    Compact form for code.

  • RGB

    rgb(59, 130, 246)

    What screens and canvas expect.

  • RGBA

    rgba(59, 130, 246, 1)

    RGB with an alpha of 1 (solid).

  • HSL

    hsl(217, 91%, 60%)

    The form humans adjust.

  • HSLA

    hsla(217, 91%, 60%, 1)

    HSL with an alpha of 1 (solid).

  • HSV

    hsv(217°, 76%, 96%)

    Hue, saturation, and value (brightness).

  • CMYK — approximate

    cmyk(76%, 47%, 0%, 4%)

    Approximate — proof before printing.

  • OKLCH (live)

    oklch(0.62 0.19 260°)

    Computed live by the tool.

  • CSS variable

    --color: #3B82F6;

    One change updates the whole site.

CSS variables export

:root {
  --color: #3B82F6;
}

Preview with this color: a link in this color

Share this page

https://hexcolorcodepicker.com/color-converter/

Convert any color free. Enter HEX, RGB, HSL, HSV, CMYK, or OKLCH once and get every format at once, all in sync, with copy buttons and CSS variables included.

One color, every format, all in sync

One color entered here comes out in every format at once: HEX, RGB, RGBA, HSL, HSLA, HSV, CMYK, OKLCH, and a CSS variable. Type #3B82F6 and the page answers rgb(59, 130, 246), hsl(217, 91%, 60%), hsv(217, 76%, 96%), and cmyk(76%, 47%, 0%, 4%) together, with a copy button on each line. Edit any one field and all the others follow it instantly.

That is the whole job of this page: it is the reverse-direction hub for the site. A designer who has an HSL value and needs HEX, a developer who has CMYK and needs RGB, and a student checking homework all use this one page instead of hunting through separate converters.

At a glance — your color in four formats

  • HEX#3B82F6
  • RGBrgb(59, 130, 246)
  • HSLhsl(217, 91%, 60%)
  • CMYK (approx.)cmyk(76%, 47%, 0%, 4%)

The full sync board — all nine formats — is the tool at the top of this page.

No separate reverse pages — this converter covers them

There are no separate HSL-to-RGB, HSV-to-HEX, CMYK-to-HEX, or OKLCH-to-HEX pages on this site, because this converter already does all of them. Every field here is an input as well as an output, so typing an HSL value gives you the HEX code, typing a CMYK value gives you the RGB numbers, and typing an OKLCH value gives you everything else. Splitting those into separate pages would duplicate this page four times.

One intent still means one page: the intent here is “convert this color into whatever form I need,” whatever form the visitor starts from. The single-format pages (HEX to CMYK, RGB to HSL, and HEX to OKLCH) exist for visitors who want one conversion explained in depth, with the worked math and the caveats.

Reverse-direction demo — tap an arrow to load a sample

Each sample loads into the converter above — watch the whole board update.

Worked example: #3B82F6 in every format

#3B82F6 is rgb(59, 130, 246), hsl(217, 91%, 60%), hsv(217, 76%, 96%), and cmyk(76%, 47%, 0%, 4%) — one color, four notations. The HEX pairs are 3B = 59, 82 = 130, and F6 = 246, which is the RGB triple directly. The HSL hue of 217° puts it in the blue range, and the HSV value of 96% says the brightest channel is nearly at full brightness.

The CMYK figures are approximate, as the HEX to CMYK page explains at length: they are the ink mix that comes closest to this screen color, not an exact match. The OKLCH figures for this color are computed live by the tool and shown on the page, not printed here, because they cannot be verified by hand.

#3B82F6 in every format

FormatValueFor
HEX#3B82F6Code
RGBrgb(59, 130, 246)Screens
HSLhsl(217, 91%, 60%)Adjusting
HSVhsv(217°, 76%, 96%)Brightness
CMYKcmyk(76%, 47%, 0%, 4%)Print (approximate)
OKLCHoklch(0.62 0.19 260°)Even scales (computed live)

The OKLCH row shows the tool's live value for #3B82F6 — no hand-written OKLCH triple is printed on this page.

Which format should you use?

Use HEX for code, RGB for screens and canvas, HSL for adjusting a color, CMYK for print, and OKLCH for even-looking palettes. HEX is the compact form developers paste into CSS. RGB is what screens and JavaScript canvas code expect. HSL is what humans adjust, because one number changes one visible thing. CMYK is what printers need. OKLCH is what designers use when steps must look even.

The format comparison table on this page lists each form with an example, its ranges, and its best use, so a visitor who only knows one format can pick the right one for the job in front of them. When in doubt, copy the HEX code — it works almost everywhere.

Format chooser — your color, live

FormatYour colorRangesBest use
HEX#3B82F6#RRGGBBCode
RGBrgb(59, 130, 246)0–255Screens
HSLhsl(217, 91%, 60%)0–360°, 0–100%Adjusting
HSVhsv(217°, 76%, 96%)0–360°, 0–100%Brightness
CMYKcmyk(76%, 47%, 0%, 4%)0–100%Print (approximate)
OKLCHoklch(0.62 0.19 260°)L 0–1, C 0–0.4Even scales

Tapping a row's Copy button copies that format for your color.

Copying colors into CSS the right way

Copy colors into CSS as a variable, not a bare value, so one change updates the whole site. The export button copies a :root block like --color: #3B82F6; with the visitor's color, ready to paste into a stylesheet. Every use of the color then reads var(--color), and changing the variable changes every button, link, and heading at once.

The page also copies each format on its own for one-off uses: a HEX code for a quick inline style, an rgba() value for a translucent overlay, or an oklch() value for a modern stylesheet. Each copy button confirms with a short “Copied” message so the visitor knows the paste will work.

CSS variable export — your color, live

:root {
  --color: #3B82F6;
}

Preview: a link in this color

Both are styled with your color — change it in the tool above and they follow.

Rounding and the approximate formats — the honest limits

Two limits apply on this page: rounding can shift one or two RGB channels by 1, and CMYK is always approximate. HSL and HSV are shown in whole degrees and whole percentages, so converting back to RGB can land one or two channels 1 higher or lower — one for HSV, two for HSL on this page's worked example — a shift of less than half a percent, invisible to the eye. HEX stays the source of truth for exact round trips.

CMYK carries the bigger warning, repeated from the HEX to CMYK page: screens add light, printers subtract it with ink, and no formula knows your printer, ink, or paper. The CMYK row on this page carries its own “approximate — proof before printing” label so the warning travels with the number.

The honest limits — beside the results

  • Rounding: HSL and HSV are whole numbers, so a round trip can shift one or two RGB channels by 1. Invisible to the eye; keep HEX as the source of truth.
  • CMYK is approximate: cmyk(76%, 47%, 0%, 4%) is the closest ink mix, not an exact match — proof before printing.
  • OKLCH is live: oklch(0.62 0.19 260°) is computed by the tool, never hand-written.

All color tools

21 tools, one topic — see About Hex Color Code Picker for who built this site.

Frequently asked questions

Type the color in any format on this page and every other format appears at once. Enter #3B82F6 and you get RGB, HSL, HSV, CMYK, OKLCH, and a CSS variable together, each with its own copy button. Edit any field and the rest follow it.