CSS named color

Slate Blue #6A5ACD

The CSS keyword slateblue is #6A5ACD. It is a vivid violet in the violet family. In OKLCH it sits at lightness 0.544, chroma 0.171 and hue 285.5°.

Relative luminance
0.1478
OKLCH L · C · h
0.544 · 0.171 · 285.5
Best text
White 5.30:1
Hue family
Violet

#6A5ACD color codes

HEX
#6A5ACD
RGB
rgb(106, 90, 205)
HSL
hsl(248, 53%, 58%)
OKLCH
oklch(0.544 0.171 285.5)
OKLab
oklab(0.544 0.046 -0.165)
CIELAB (D65)
L* 45.34, a* 36.04, b* -57.77
XYZ (D65)
X 20.62, Y 14.78, Z 59.51
CMYK (naive)
cmyk(48%, 56%, 0%, 20%)

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 #6A5ACD accessible?

White text on it reaches 5.30:1, passing AA. Black text manages only 3.95: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

    3.95:1

    • AA fails
    • AA large passes
    • AAA fails
    • APCA Lc +27
  • White text on it

    5.30:1

    • AA passes
    • AA large passes
    • AAA fails
    • APCA Lc −81
  • As text on black

    3.95:1

    • AA fails
    • AA large passes
    • AAA fails
    • APCA Lc −25
  • As text on white

    5.30:1

    • AA passes
    • AA large passes
    • AAA fails
    • APCA Lc +76

Nearest versions that pass 4.5:1

  • For text on white

    #6A5ACD 5.30:1

    It already reaches 5.30:1 on white, so no change is needed.

  • For text on black

    #7465D9 4.60:1

    Lightening its OKLCH lightness from 0.54 to 0.58 reaches 4.60:1 on black, keeping the hue.

Checking another pair? Use the Contrast Checker.

Studio

Adjust #6A5ACD 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.

The studio needs JavaScript.

Scale

Shades and tints of #6A5ACD

Eleven OKLCH lightness steps at this hue, each with its contrast against white and black. #6A5ACD sits at step 600.

  1. 50#F4F4FF
    White
    1.09
    Black
    19.23
  2. 100#E9E9FF
    White
    1.19
    Black
    17.56
  3. 200#D3D2FF
    White
    1.45
    Black
    14.43
  4. 300#B7B4FF
    White
    1.91
    Black
    10.98
  5. 400#9A90FF
    White
    2.68
    Black
    7.80
  6. 500#7F72E7
    White
    3.84
    Black
    5.46
  7. 600This color#6A5ACD
    White
    5.30
    Black
    3.95
  8. 700#5441AE
    White
    7.65
    Black
    2.74
  9. 800#3D288D
    White
    11.13
    Black
    1.88
  10. 900#280D6B
    White
    15.44
    Black
    1.36
  11. 950#170047
    White
    18.62
    Black
    1.12

Under each step, white and black text on it; a bold figure passes 4.5:1.

Gamut

How vivid #6A5ACD can get

At its lightness and hue, sRGB reaches OKLCH chroma 0.266; #6A5ACD uses 64% of it. Display P3, which many recent phones and laptops show, reaches 0.286 there: 7% more.

0.00.20.40.60.80.20.40.60.8 460480500520540560580600620
  • sRGB
  • Display P3
  • Rec. 2020
  • Dominant wavelength
OKLCH chroma
0.171
sRGB edge
0.266
Display P3 edge
0.286
Rec. 2020 edge
0.289
Dominant wavelength
458 nm
Excitation purity
57%
Chromaticity
x 0.2172, y 0.1558
  • This color#6A5ACD
  • Most vivid in sRGB#6E39FF
  • Most vivid in Display P3oklch(0.544 0.286 285.5)

On a screen without Display P3 the last tile shows the sRGB edge instead.

Use the wider color where screens show it
.accent {
  color: #6a5acd;
}
@media (color-gamut: p3) {
  .accent { color: color(display-p3 0.4045 0.1921 1); }
}

Mixing

Mixing #6A5ACD

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%#B5ADE6
  • OKLab50%#AFADEA
  • OKLCH50%#AFADEA

Black #000000

  • sRGB50%#352D67
  • OKLab50%#241E4E
  • OKLCH50%#241E4E

Its complement #7A7300

  • sRGB50%#726767
  • OKLab50%#6E6E80
  • OKLCH50%#B44553
In CSS
/* A gradient and a mix, worked out in OKLCH */
background: linear-gradient(in oklch, #6a5acd, white);
color: color-mix(in oklch, #6a5acd 50%, white);

In use

#6A5ACD 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.30:1 Passes
  • Link and body-size textText, 4.5:15.30:1 Passes
  • Large headingLarge text, 3:15.30:1 Passes
  • Icons, borders and focus ringsNon-text, 3:15.30:1 Passes

Dark page

  • Button labelText, 4.5:15.30:1 Passes
  • Link and body-size textText, 4.5:13.52:1 Fails
  • Large headingLarge text, 3:13.52:1 Passes
  • Icons, borders and focus ringsNon-text, 3:13.52:1 Passes

For text on this page, the nearest shade that passes is #7B6DE1 4.56:1

Color vision

How #6A5ACD looks with color blindness

Achromatopsia changes it most, ΔE2000 27.0; tritanopia changes it least, 14.0.

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

    #0E6FD1 ΔE2000 15.2

    Distinct

    Reads as vivid blue

  • Deuteranopia

    No working green (medium-wavelength) cones

    #0668CB ΔE2000 14.1

    Distinct

    Reads as vivid blue

  • Tritanopia

    No working blue (short-wavelength) cones

    #48748B ΔE2000 14.0

    Distinct

    Reads as muted blue

  • Achromatopsia

    No cone color vision; lightness only

    #6B6B6B ΔE2000 27.0

    Distinct

    Reads as gray

Pairing check

Checked against its complement, #7A7300. Their lightness contrast is only 1.08:1, so where hue collapses, add a label, icon or pattern.

VisionThe pairΔE2000Verdict
Normal vision#6A5ACD · #7A730063.9Stays distinct
Protanopia#0E6FD1 · #7E6E0056.0Stays distinct
Deuteranopia#0668CB · #81721056.2Stays distinct
Tritanopia#48748B · #846A6128.9Stays distinct
Achromatopsia#6B6B6B · #7171712.3Easily confused

Harmony

Color harmonies for #6A5ACD

Its complement is #7A7300, a soft yellow.

Hue rotations in OKLCH, mapped into sRGB by trimming chroma so hue and lightness stay put.

Open the Harmony Studio
  • Base#6A5ACD
  • Complement#7A7300

Complementary

Open in Harmony Studio
  • −30°#156DD0
  • Base#6A5ACD
  • +30°#9549B2
  • Base#6A5ACD
  • +120°#B54A00
  • +240°#008460
  • Base#6A5ACD
  • +150°#966400
  • +210°#408300

Split-complementary

Open in Harmony Studio

Code

Design tokens

Ready-to-paste tokens in six formats. Rename them to fit your system.

CSS custom property

:root {
  --color-slateblue: #6a5acd;
}

Tailwind config

// tailwind.config.js
module.exports = {
  theme: {
    extend: {
      colors: {
        slateblue: '#6a5acd',
      },
    },
  },
};

Tailwind v4 theme

/* app.css — Tailwind CSS v4 */
@import "tailwindcss";

@theme {
  --color-slateblue: oklch(0.544 0.171 285.5);
}

Design token (W3C DTCG)

{
  "color": {
    "slateblue": {
      "$type": "color",
      "$value": {
        "colorSpace": "srgb",
        "components": [0.4157, 0.3529, 0.8039],
        "hex": "#6a5acd"
      },
      "$description": "CSS named color slateblue"
    }
  }
}

SwiftUI color

import SwiftUI

enum Palette {
    static let slateblue = Color(.sRGB, red: 0.416, green: 0.353, blue: 0.804, opacity: 1)
}

Jetpack Compose color

import androidx.compose.ui.graphics.Color

object Palette {
    val Slateblue = Color(0xFF6A5ACD)
}

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 #6A5ACD in the tools

Each opens over this page. More colors live in the Color Library, and every color page is listed on the hub.