OKLCH to HEX: #7B68EE

Also known as: CSS mediumslateblue

Result

oklch(0.60447 0.19389 285.498) → #7B68EE

Values are shown at full precision, so converting back gives exactly #7b68ee. The rounded form is what you normally paste into CSS.

Step-by-step math

Every number below is computed from the input, nothing is looked up.

  1. 1. input

    oklch(0.60447 0.19389 285.498)
  2. 2. OKLCH → Oklab

    a = C·cos H = 0.05181
    b = C·sin H = -0.18684
  3. 3. Oklab → LMS′

    l′ = L + 0.3963·a + 0.2158·b = 0.584683
    m′ = L − 0.1056·a − 0.0639·b = 0.610932
    s′ = L − 0.0895·a − 1.2915·b = 0.841135
  4. 4. cube

    l = 0.584683³ = 0.199876
    m = 0.610932³ = 0.228022
    s = 0.841135³ = 0.595110
  5. 5. LMS → linear sRGB

    R = 4.0767·l − 3.3077·m + 0.2310·s = 0.198063
    G = −1.2684·l + 2.6098·m − 0.3413·s = 0.138430
    B = −0.0042·l − 0.7034·m + 1.7076·s = 0.854985
  6. 6. linear → sRGB, × 255

    R = 0.48235 × 255 = 123.00 → 123
    G = 0.40784 × 255 = 104.00 → 104
    B = 0.93333 × 255 = 238.00 → 238
  7. 7. RGB → HEX

    #7B68EE

All formats

HEX
#7b68ee
RGB
rgb(123 104 238)
RGB (legacy)
rgb(123, 104, 238)
HSL
hsl(248.51 79.76% 67.06%) → hsl(249 80% 67%)
HWB
hwb(249 41% 7%)
OKLCH
oklch(0.604 0.194 285.5) · oklch(60.4% 0.194 285.5)
OKLab
oklab(0.604 0.052 -0.187)
Lab (D50)
lab(51.28 33.84 -66.48)
LCH (D50)
lch(51.28 74.59 296.98)
Display P3
color(display-p3 0.4702 0.4106 0.9023)
Linear sRGB
color(srgb-linear 0.1981 0.1384 0.8550)

Gamut: sRGB and Display P3

#7B68EE is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.225 and Display P3 reaches 0.243; this color uses 86% of the sRGB chroma available.

CSS snippets

.element {
  color: #7b68ee;
  color: rgb(123 104 238);
  color: hsl(249 80% 67%);
  color: oklch(0.604 0.194 285.5);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.604 0.194 285.5);
}
/* arbitrary values */
class="text-[#7b68ee] bg-[oklch(0.604_0.194_285.5)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.4702 0.4106 0.9023); }
}

/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #7b68ee calc(l - 0.1) c h); }

Nearby colors

Closest colors in the Tailwind and CSS named palettes (OKLab distance).

Lighter and darker, same hue and chroma

  • #8C7BFF · oklch(0.664 0.194 285.5) · ΔL +0.06
  • #6B55D9 · oklch(0.544 0.194 285.5) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?