CSS named color

Dark Orchid #9932CC

The CSS keyword darkorchid is #9932CC. It is a vivid violet in the violet family. In OKLCH it sits at lightness 0.541, chroma 0.227 and hue 311.5°.

Relative luminance
0.1341
OKLCH L · C · h
0.541 · 0.227 · 311.5
Best text
White 5.70:1
Hue family
Violet

#9932CC color codes

HEX
#9932CC
RGB
rgb(153, 50, 204)
HSL
hsl(280, 61%, 50%)
OKLCH
oklch(0.541 0.227 311.5)
OKLab
oklab(0.541 0.151 -0.170)
CIELAB (D65)
L* 43.38, a* 65.15, b* -60.10
XYZ (D65)
X 25.17, Y 13.41, Z 58.38
CMYK (naive)
cmyk(25%, 75%, 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 #9932CC accessible?

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

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

    5.70:1

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

    3.68:1

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

    5.70:1

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

Nearest versions that pass 4.5:1

  • For text on white

    #9932CC 5.70:1

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

  • For text on black

    #A944DD 4.55:1

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

Checking another pair? Use the Contrast Checker.

Studio

Adjust #9932CC 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 #9932CC

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

  1. 50#F9F2FF
    White
    1.09
    Black
    19.17
  2. 100#F4E4FF
    White
    1.20
    Black
    17.38
  3. 200#E9C9FF
    White
    1.47
    Black
    14.26
  4. 300#DBA3FF
    White
    1.96
    Black
    10.69
  5. 400#CC73FF
    White
    2.81
    Black
    7.46
  6. 500#B24FE7
    White
    4.06
    Black
    5.16
  7. 600This color#9932CC
    White
    5.70
    Black
    3.68
  8. 700#7F11AE
    White
    8.09
    Black
    2.59
  9. 800#5F0084
    White
    11.53
    Black
    1.81
  10. 900#3F0059
    White
    15.49
    Black
    1.35
  11. 950#240036
    White
    18.61
    Black
    1.12

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

Gamut

How vivid #9932CC can get

At its lightness and hue, sRGB reaches OKLCH chroma 0.272; #9932CC uses 84% of it. Display P3, which many recent phones and laptops show, reaches 0.288 there: 6% more.

0.00.20.40.60.80.20.40.60.8 460480500520540560580600620
  • sRGB
  • Display P3
  • Rec. 2020
  • Dominant wavelength
OKLCH chroma
0.227
sRGB edge
0.272
Display P3 edge
0.288
Rec. 2020 edge
0.324
Dominant wavelength
Complementary 562 nm
Excitation purity
63%
Chromaticity
x 0.2596, y 0.1383
  • This color#9932CC
  • Most vivid in sRGB#A100DD
  • Most vivid in Display P3oklch(0.541 0.288 311.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: #9932cc;
}
@media (color-gamut: p3) {
  .accent { color: color(display-p3 0.5855 0 0.8603); }
}

Mixing

Mixing #9932CC

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%#CC99E6
  • OKLab50%#CC9FE9
  • OKLCH50%#CC9FE9

Black #000000

  • sRGB50%#4D1966
  • OKLab50%#380D4E
  • OKLCH50%#380D4E

Its complement #4D7F00

  • sRGB50%#735966
  • OKLab50%#766980
  • OKLCH50%#007B98
In CSS
/* A gradient and a mix, worked out in OKLCH */
background: linear-gradient(in oklch, #9932cc, white);
color: color-mix(in oklch, #9932cc 50%, white);

In use

#9932CC 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.70:1 Passes
  • Link and body-size textText, 4.5:15.70:1 Passes
  • Large headingLarge text, 3:15.70:1 Passes
  • Icons, borders and focus ringsNon-text, 3:15.70:1 Passes

Dark page

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

For text on this page, the nearest shade that passes is #B14DE6 4.52:1

Color vision

How #9932CC looks with color blindness

Achromatopsia changes it most, ΔE2000 29.6; tritanopia changes it least, 17.8.

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

    #0062D0 ΔE2000 24.2

    Distinct

    Reads as vivid blue

  • Deuteranopia

    No working green (medium-wavelength) cones

    #1468C9 ΔE2000 26.2

    Distinct

    Reads as soft blue

  • Tritanopia

    No working blue (short-wavelength) cones

    #92567E ΔE2000 17.8

    Distinct

    Reads as muted magenta

  • Achromatopsia

    No cone color vision; lightness only

    #666666 ΔE2000 29.6

    Distinct

    Reads as gray

Pairing check

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

VisionThe pairΔE2000Verdict
Normal vision#9932CC · #4D7F0082.4Stays distinct
Protanopia#0062D0 · #85740059.5Stays distinct
Deuteranopia#1468C9 · #7E701655.2Stays distinct
Tritanopia#92567E · #4E796B33.8Stays distinct
Achromatopsia#666666 · #7272724.6Easily confused

Harmony

Color harmonies for #9932CC

Its complement is #4D7F00, a soft green.

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

Open the Harmony Studio
  • Base#9932CC
  • Complement#4D7F00

Complementary

Open in Harmony Studio
  • −30°#624DEC
  • Base#9932CC
  • +30°#BD0F94
  • Base#9932CC
  • +120°#986200
  • +240°#00807C
  • Base#9932CC
  • +150°#7D7000
  • +210°#008458

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-darkorchid: #9932cc;
}

Tailwind config

// tailwind.config.js
module.exports = {
  theme: {
    extend: {
      colors: {
        darkorchid: '#9932cc',
      },
    },
  },
};

Tailwind v4 theme

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

@theme {
  --color-darkorchid: oklch(0.541 0.227 311.5);
}

Design token (W3C DTCG)

{
  "color": {
    "darkorchid": {
      "$type": "color",
      "$value": {
        "colorSpace": "srgb",
        "components": [0.6, 0.1961, 0.8],
        "hex": "#9932cc"
      },
      "$description": "CSS named color darkorchid"
    }
  }
}

SwiftUI color

import SwiftUI

enum Palette {
    static let darkorchid = Color(.sRGB, red: 0.600, green: 0.196, blue: 0.800, opacity: 1)
}

Jetpack Compose color

import androidx.compose.ui.graphics.Color

object Palette {
    val Darkorchid = Color(0xFF9932CC)
}

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 #9932CC in the tools

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