CSS named color
Medium Slate Blue #7B68EE
The CSS keyword mediumslateblue is #7B68EE. It is a vivid violet in the violet family. In OKLCH it sits at lightness 0.604, chroma 0.194 and hue 285.5°.
- Relative luminance
- 0.2028
- OKLCH L · C · h
- 0.604 · 0.194 · 285.5
- Best text
- Black 5.05:1
- Hue family
- Violet
#7B68EE color codes
- HEX
#7B68EE- RGB
rgb(123, 104, 238)- HSL
hsl(249, 80%, 67%)- OKLCH
oklch(0.604 0.194 285.5)- OKLab
oklab(0.604 0.052 -0.187)- CIELAB (D65)
L* 52.16, a* 41.07, b* -65.40- XYZ (D65)
X 28.55, Y 20.28, Z 83.28- CMYK (naive)
cmyk(48%, 56%, 0%, 7%)
CIELAB and XYZ use the D65 white point; CSS lab() uses D50, so paste the OKLCH or HEX value into stylesheets. CMYK here is a plain formula with no press profile.
Legibility
Contrast: is #7B68EE accessible?
Black text on it reaches 5.05:1, passing AA. White text manages only 4.15:1, enough for large text only.
WCAG 2 gives the same ratio whichever color is the text; APCA does not, so its Lc changes sign and size with polarity.
Open the Contrast System-
Black text on it
5.05:1
- AA passes
- AA large passes
- AAA fails
- APCA Lc +35
-
White text on it
4.15:1
- AA fails
- AA large passes
- AAA fails
- APCA Lc −73
-
As text on black
5.05:1
- AA passes
- AA large passes
- AAA fails
- APCA Lc −33
-
As text on white
4.15:1
- AA fails
- AA large passes
- AAA fails
- APCA Lc +68
Nearest versions that pass 4.5:1
-
For text on white
#7562E7 4.50:1
Darkening its OKLCH lightness from 0.60 to 0.58 reaches 4.50:1 on white, keeping the hue.
-
For text on black
#7B68EE 5.05:1
It already reaches 5.05:1 on black, so no change is needed.
Checking another pair? Use the Contrast Checker.
Studio
Adjust #7B68EE live
Move lightness, chroma and hue in OKLCH, or drag on the map. The map is every lightness and chroma at the current hue: sRGB inside the solid area, Display P3 out to the dashed line.
Scale
Shades and tints of #7B68EE
Eleven OKLCH lightness steps at this hue, each with its contrast against white and black. #7B68EE sits at step 500.
Under each step, white and black text on it; a bold figure passes 4.5:1.
Gamut
How vivid #7B68EE can get
At its lightness and hue, sRGB reaches OKLCH chroma 0.225; #7B68EE uses 86% of it. Display P3, which many recent phones and laptops show, reaches 0.243 there: 8% more.
- sRGB
- Display P3
- Rec. 2020
- Dominant wavelength
- OKLCH chroma
- 0.194
- sRGB edge
- 0.225
- Display P3 edge
- 0.243
- Rec. 2020 edge
- 0.246
- Dominant wavelength
- 458 nm
- Excitation purity
- 58%
- Chromaticity
- x 0.2161, y 0.1535
- This color#7B68EE
- Most vivid in sRGB#7C60FF
- Most vivid in Display P3oklch(0.604 0.243 285.5)
On a screen without Display P3 the last tile shows the sRGB edge instead.
.accent {
color: #7b68ee;
}
@media (color-gamut: p3) {
.accent { color: color(display-p3 0.4674 0.3598 1); }
}
Mixing
Mixing #7B68EE
Each row is the same mix worked out in a different space, with the halfway color at its end. sRGB, which older CSS gradients use, can sag gray or dark in the middle; OKLab keeps the lightness steps even; OKLCH holds chroma and hue as it goes.
White #FFFFFF
- sRGB50%#BDB4F7
- OKLab50%#B8B6FB
- OKLCH50%#B8B6FB
Black #000000
- sRGB50%#3E3477
- OKLab50%#2C245C
- OKLCH50%#2C245C
Its complement #8D8500
- sRGB50%#847777
- OKLab50%#7F7F95
- OKLCH50%#D05061
/* A gradient and a mix, worked out in OKLCH */
background: linear-gradient(in oklch, #7b68ee, white);
color: color-mix(in oklch, #7b68ee 50%, white);
In use
#7B68EE in an interface
A button, a link, a heading, a focused field, an icon and a chart line in this color, on a light page and a dark one. Each check is a WCAG 2 contrast minimum: 1.4.3 for text, 1.4.11 for the rest.
Light page
- Button labelText, 4.5:15.05:1 Passes
- Link and body-size textText, 4.5:14.15:1 Fails
- Large headingLarge text, 3:14.15:1 Passes
- Icons, borders and focus ringsNon-text, 3:14.15:1 Passes
For text on this page, the nearest shade that passes is #7562E7 4.50:1
Dark page
- Button labelText, 4.5:15.05:1 Passes
- Link and body-size textText, 4.5:14.51:1 Passes
- Large headingLarge text, 3:14.51:1 Passes
- Icons, borders and focus ringsNon-text, 3:14.51:1 Passes
Color vision
How #7B68EE looks with color blindness
Achromatopsia changes it most, ΔE2000 28.2; deuteranopia changes it least, 15.3.
Simulated with Machado et al. (2009) at full severity, in linear light.
Simulate a whole page What each type sees-
Protanopia
No working red (long-wavelength) cones
#0280F2 ΔE2000 16.7
Distinct
Reads as vivid blue
-
Deuteranopia
No working green (medium-wavelength) cones
#0078EB ΔE2000 15.3
Distinct
Reads as vivid blue
-
Tritanopia
No working blue (short-wavelength) cones
#5286A1 ΔE2000 15.5
Distinct
Reads as muted blue
-
Achromatopsia
No cone color vision; lightness only
#7C7C7C ΔE2000 28.2
Distinct
Reads as gray
Pairing check
Checked against its complement, #8D8500. Their lightness contrast is only 1.08:1, so where hue collapses, add a label, icon or pattern.
| Vision | The pair | ΔE2000 | Verdict |
|---|---|---|---|
| Normal vision | #7B68EE · #8D8500 | 67.8 | Stays distinct |
| Protanopia | #0280F2 · #928000 | 59.3 | Stays distinct |
| Deuteranopia | #0078EB · #958414 | 59.5 | Stays distinct |
| Tritanopia | #5286A1 · #997B70 | 31.2 | Stays distinct |
| Achromatopsia | #7C7C7C · #828282 | 2.3 | Easily confused |
Harmony
Color harmonies for #7B68EE
Its complement is #8D8500, a soft yellow.
Hue rotations in OKLCH, mapped into sRGB by trimming chroma so hue and lightness stay put.
Open the Harmony Studio- Base#7B68EE
- Complement#8D8500
Complementary
Open in Harmony Studio- −30°#147FF1
- Base#7B68EE
- +30°#AC54CE
Analogous
Open in Harmony Studio- Base#7B68EE
- +120°#D05700
- +240°#00996F
Triadic
Open in Harmony Studio- Base#7B68EE
- +150°#AD7500
- +210°#4B9700
Split-complementary
Open in Harmony StudioCode
Design tokens
Ready-to-paste tokens in six formats. Rename them to fit your system.
:root {
--color-mediumslateblue: #7b68ee;
}
// tailwind.config.js
module.exports = {
theme: {
extend: {
colors: {
mediumslateblue: '#7b68ee',
},
},
},
};
/* app.css — Tailwind CSS v4 */
@import "tailwindcss";
@theme {
--color-mediumslateblue: oklch(0.604 0.194 285.5);
}
{
"color": {
"mediumslateblue": {
"$type": "color",
"$value": {
"colorSpace": "srgb",
"components": [0.4824, 0.4078, 0.9333],
"hex": "#7b68ee"
},
"$description": "CSS named color mediumslateblue"
}
}
}
import SwiftUI
enum Palette {
static let mediumslateblue = Color(.sRGB, red: 0.482, green: 0.408, blue: 0.933, opacity: 1)
}
import androidx.compose.ui.graphics.Color
object Palette {
val Mediumslateblue = Color(0xFF7B68EE)
}
Matches
The nearest match in each system
The closest CSS name, Tailwind shade, RAL Classic paint and Crayola crayon by ΔE2000; under 2 is hard to tell apart side by side. RAL and Crayola values approximate physical colors.
Tools
Open #7B68EE in the tools
Each opens over this page. More colors live in the Color Library, and every color page is listed on the hub.
- Color InspectorEvery format, its names, contrast and color vision in one panel.
- Contrast SystemBlack and white text on this color, with fixes in both directions.
- Harmony StudioPalettes built from this color, walked to a contrast target if you ask.
- Color Space ConverterThe same color in 34 notations, with its gamut headroom.
- Color Name FinderThe nearest of 1,055 color names by ΔE2000.