Color reference

#21107B color reference

Clear Dark Violet

This is a clear, dark violet under the deterministic OKLCH hue, lightness, and chroma ranges. Its closest standardized CSS named color is Midnight Blue (#191970), measured with straight-line OKLab distance.

Descriptive label
Clear Dark Violet
Recommended text
White · 14.74:1
Relative luminance
0.021240
Formats UI preview Contrast 50–900 scale Harmonies Matches Related colors Color vision Exports

Copyable values

#21107B in common color formats

Values are calculated from the same opaque sRGB color. Display rounding does not alter the internal calculations.

Color conversions for #21107B
Format Value Action
HEX #21107B
RGB rgb(33 16 123)
HSL hsl(250 76.98% 27.25%)
HSV hsv(250 86.99% 48.24%)
HWB hwb(250 6.27% 51.76%)
XYZ D65 color(xyz-d65 0.043872 0.021239 0.189183)
LAB lab(15.0105% 34.9264 -57.8217)
LCH lch(15.0105% 67.5514 301.1335)
OKLAB oklab(29.5393% 0.019188 -0.162405)
OKLCH oklch(29.5393% 0.163534 276.7382)

Real-world test

Try #21107B on interface components

Preview the source as a primary action, subtle status, form treatment, and card surface. Persistent state controls help touch and keyboard users inspect the same normal, hover, and active colors.

Normal state uses #21107B with white text at 14.74:1.

Action

Primary button

Use the controls above or point to and press the button to inspect its visual states.

Status

Subtle alert badge

A 12% source tint over white provides the background; readable text is selected separately.

Ready for review

Form

Border and focus ring

Source ring on white: 14.74:1 · meets the 3:1 non-text threshold where applicable.

Surface

Card component

The selected state becomes the card surface with its strongest black-or-white text pairing.

Design system Color decision ready Review states and surrounding surfaces before shipping.

Accessibility diagnostics

WCAG contrast for exact color pairs

Each result applies only to the named foreground, background, text size, and requirement. It is not a complete accessibility or component-conformance claim.

Source #21107B Exact pair assessment Results for source text on white appear below.

On white

14.74:1

  • Pass AA normal text · 4.5:1
  • Pass AAA normal text · 7:1
  • Pass AA large text · 3:1
  • Pass UI/non-text where applicable · 3:1
Source #21107B Exact pair assessment Results for source text on black appear below.

On black

1.42:1

  • Fail AA normal text · 4.5:1
  • Fail AAA normal text · 7:1
  • Fail AA large text · 3:1
  • Fail UI/non-text where applicable · 3:1

Use guidance

What this color may be suitable for

Pass in a tested context

Normal-sized text

#21107B reaches 14.1:1 on Hue Codex paper, meeting WCAG AA for normal text in that exact pairing.

Potential fit

Controls and interface graphics

Against Hue Codex paper, the color reaches 14.1:1. That meets the 3:1 color-contrast threshold where WCAG 1.4.11 applies, but states, shape, and non-color cues still need review.

Readable pairing available

Colored surface or button fill

White text provides the stronger black/white pairing on #21107B at 14.74:1. This validates only that text pair, not hover, focus, disabled, or adjacent-color states.

Distinctive accent

Palette role

Its OKLCH chroma of 0.1635 gives it enough visual presence for an accent or primary role when the tested foreground and neighboring colors pass.

Pair available

Color used as foreground

The stronger black/white background is white at 14.74:1. Always retest against the actual rendered background and text size.

Tested backgrounds

Foreground pairing comparison

#21107B foreground contrast on tested backgrounds
Pair Background Contrast ratio
White#FFFFFF 14.74:1
Hue Codex paper#FBFAF5 14.1:1
Soft neutral#F2EFE6 12.82:1
Black#000000 1.42:1
Hue Codex ink#10212B 1.12:1
Check #21107B on another background in Contrast Checker

Design-system starting point

A perceptual 50–900 reference scale

The source color is preserved at the nearest lightness step. Other swatches keep its OKLCH hue, moderate chroma toward the extremes, and reduce chroma only when needed to remain in sRGB.

50
100
200
300
400
500
600
700
800
900 #21107B Source

This is a Hue Codex reference scale, not a claim that the values match Tailwind, Material, or another framework’s named palette.

Adjust the #21107B scale in Tints, Shades & Tones

Color relationships

Complementary, analogous, and triadic colors

Hue rotations use OKLCH while preserving lightness and requested chroma. When a rotated result falls outside sRGB, chroma is reduced deterministically and disclosed.

Complementary

Source #21107B
Complement Chroma fitted to sRGB

Analogous

Source #21107B
Analogous −30° Chroma fitted to sRGB
Analogous +30° Chroma fitted to sRGB

Triadic

Source #21107B
Triad +120° Chroma fitted to sRGB
Triad +240° Chroma fitted to sRGB

Applied pairing

A small interface check

The source anchors the main action while the complement marks a secondary status. Contrast is selected separately for each fill.

Project color Clear Dark Violet
Complement
Explore #21107B in Color Harmonies

Distance matching

Closest standardized and framework colors

Matches use straight-line OKLab distance ×100. A smaller value means the coordinates are closer in this model; it is not a claim that two tokens are interchangeable in a design system.

CSS named color

Midnight Blue

#191970

OKLab distance ×100: 2.37

Tailwind v4 default

violet-950

oklch(28.3% 0.141 291.089)

OKLab distance ×100: 4.58 · sRGB preview #2F0D68

Print boundary

Pantone match not estimated

Reliable print matching needs licensed reference data plus a defined ink, paper, profile, and viewing condition.

Read the print methodology

Color-vision screening

Approximate color-vision-deficiency views

These encoded-sRGB matrix previews are screening approximations. They help reveal possible color-only distinctions but do not reproduce every person’s vision or establish accessibility conformance.

Original#21107B
Approx.

Protanopia

Red-vision deficiency approximation

Original#21107B
Approx.

Deuteranopia

Green-vision deficiency approximation

Original#21107B
Approx.

Tritanopia

Blue-yellow deficiency approximation

Original#21107B
Approx.#212121

Achromatopsia

Monochromatic-vision approximation

Test #21107B with a complete palette in the CVD Simulator

Ready to use

Copy framework-ready color tokens

Exports preserve the source, readable foreground, and generated 50–900 scale. Tailwind v4 CSS-first and Tailwind v3 JavaScript-config formats are labeled separately.

CSS custom properties

Semantic aliases and the complete 50–900 scale.

:root {
  --color-primary: #21107B;
  --color-on-primary: #FFFFFF;
  --color-primary-oklch: oklch(29.5393% 0.163534 276.7382);
  --color-primary-50: #F2F4FF;
  --color-primary-100: #D5DCFF;
  --color-primary-200: #B5BFFF;
  --color-primary-300: #98A3F5;
  --color-primary-400: #7F8ADF;
  --color-primary-500: #6770C9;
  --color-primary-600: #5057B3;
  --color-primary-700: #3C3E9D;
  --color-primary-800: #2A2387;
  --color-primary-900: #21107B;
}

Tailwind v4 CSS-first theme

Current @theme syntax for bg-brand, text-brand, and scale utilities.

@import "tailwindcss";

@theme {
  --color-brand: #21107B;
  --color-brand-foreground: #FFFFFF;
  --color-brand-50: #F2F4FF;
  --color-brand-100: #D5DCFF;
  --color-brand-200: #B5BFFF;
  --color-brand-300: #98A3F5;
  --color-brand-400: #7F8ADF;
  --color-brand-500: #6770C9;
  --color-brand-600: #5057B3;
  --color-brand-700: #3C3E9D;
  --color-brand-800: #2A2387;
  --color-brand-900: #21107B;
}

Tailwind v3 / legacy config

CommonJS theme.extend.colors for JavaScript-config projects.

module.exports = {
  theme: {
    extend: {
      colors: {
        brand: {
          '50': '#F2F4FF',
          '100': '#D5DCFF',
          '200': '#B5BFFF',
          '300': '#98A3F5',
          '400': '#7F8ADF',
          '500': '#6770C9',
          '600': '#5057B3',
          '700': '#3C3E9D',
          '800': '#2A2387',
          '900': '#21107B',
          DEFAULT: '#21107B',
          foreground: '#FFFFFF',
        },
      },
    },
  },
};

Sass variables

Semantic source, foreground, OKLCH, and scale variables.

$color-primary: #21107B;
$color-on-primary: #FFFFFF;
$color-primary-oklch: oklch(29.5393% 0.163534 276.7382);
$color-primary-50: #F2F4FF;
$color-primary-100: #D5DCFF;
$color-primary-200: #B5BFFF;
$color-primary-300: #98A3F5;
$color-primary-400: #7F8ADF;
$color-primary-500: #6770C9;
$color-primary-600: #5057B3;
$color-primary-700: #3C3E9D;
$color-primary-800: #2A2387;
$color-primary-900: #21107B;

Modern color-mix()

Static fallbacks followed by OKLab tint and shade declarations.

:root {
  --color-primary: #21107B;
  --color-primary-tint: #B5BFFF;
  --color-primary-tint: color-mix(in oklab, var(--color-primary) 72%, white);
  --color-primary-shade: #3C3E9D;
  --color-primary-shade: color-mix(in oklab, var(--color-primary) 82%, black);
}

JSON design data

Source formats, readable text, and the generated scale.

{
    "name": "Clear Dark Violet",
    "hex": "#21107B",
    "rgb": "rgb(33 16 123)",
    "oklch": "oklch(29.5393% 0.163534 276.7382)",
    "recommendedText": "#FFFFFF",
    "scale": {
        "50": "#F2F4FF",
        "100": "#D5DCFF",
        "200": "#B5BFFF",
        "300": "#98A3F5",
        "400": "#7F8ADF",
        "500": "#6770C9",
        "600": "#5057B3",
        "700": "#3C3E9D",
        "800": "#2A2387",
        "900": "#21107B"
    }
}

Continue the decision

Use #21107B in a complete workflow

Reference values are a starting point. Test the color in its real role, background, states, typography, and surrounding palette before shipping.