HEX to RGB: #7B68EE

Also known as: CSS mediumslateblue

Result

#7B68EE → rgb(123 104 238)

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. HEX → pairs

    #7B68EE → 7B | 68 | EE
  2. 2. base 16 → base 10

    R = 7B₁₆ = 7×16 + 11 = 123
    G = 68₁₆ = 6×16 + 8 = 104
    B = EE₁₆ = 14×16 + 14 = 238
  3. 3. RGB

    rgb(123 104 238)

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?