#40125C#40125C

#40125C is a dark, vivid violet. Relative luminance 0.023; OKLCH L 30.0% C 0.126 H 308.9°. Best body text is #FFFFFF at 14.39:1 contrast (WCAG AA passes).

Color values

HEX#40125C
RGBrgb(64, 18, 92)
HSLhsl(277, 67%, 22%)
HSVhsv(277, 80%, 36%)
CMYKcmyk(30.4%, 80.4%, 0%, 63.9%)
CIE-LABlab(16.97, 35.54, -34.41)
CIE-LCHlch(16.97, 49.47, 315.92°)
OKLaboklab(30.01% 0.0789 -0.0976)
OKLCHoklch(30.01% 0.126 308.9)
XYZxyz(4.2620, 2.2954, 10.3417)
Luminance0.0230 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40125C #2E5C12
analogous
#1B125C #40125C #5C1253
triadic
#40125C #5C4012 #125C40
tetradic
#40125C #5C1B12 #2E5C12 #12535C
square
#40125C #5C1B12 #2E5C12 #12535C
split-complementary
#40125C #535C12 #125C1B
monochromatic
#12051A #1C0829 #40125C #641C8F #8726C2

Accessibility & contrast

On white

14.39
#40125C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.46
#40125C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40125C
14.39:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40125C#FFFFFF#000000##FFFFFF
##40125C1.0014.391.4614.39
#FFFFFF14.391.0021.001.00
#0000001.4621.001.0021.00
##FFFFFF14.391.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00285E
Deuteranopia (green-blind)
#002A5A
Tritanopia (blue-blind)
#3C2436
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #40125c;
/* rgb */ color: rgb(64, 18, 92);
/* oklch */ color: oklch(30.0% 0.126 308.9);
Tailwind
colors: {
  custom: {
    50: '#78558b',
    500: '#40125c',
    950: '#000000',
  },
}
SCSS
$custom: #40125c;
$custom-light: #78558b;
$custom-dark: #000000;
JSON
{
  "hex": "#40125c",
  "rgb": {
    "r": 64,
    "g": 18,
    "b": 92
  },
  "hsl": {
    "h": 277.297,
    "s": 67.273,
    "l": 21.569
  },
  "oklch": {
    "l": 0.30014,
    "c": 0.12552,
    "h": 308.9
  },
  "luminance": 0.02295
}

Semantic roles & 50–950 ramp

primary
#40125C
secondary
#599435
accent
#EA3E7F
background
#F7F5F8
surface
#EEE9F0
border
#C9C5CB
text
#09030C
muted
#7B787D

Preview Lab

Preview with #40125C

Body copy rendered with the generated semantic roles for this colour.

Preview Lab → · Contrast checker → · Palette generator →

#40125C Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva