#40188F#40188F

#40188F is a dark, vivid violet. Relative luminance 0.037; OKLCH L 35.5% C 0.176 H 289.3°. Best body text is #FFFFFF at 12.03:1 contrast (WCAG AA passes).

Color values

HEX#40188F
RGBrgb(64, 24, 143)
HSLhsl(260, 71%, 33%)
HSVhsv(260, 83%, 56%)
CMYKcmyk(55.2%, 83.2%, 0%, 43.9%)
CIE-LABlab(22.74, 46.48, -57.77)
CIE-LCHlch(22.74, 74.15, 308.82°)
OKLaboklab(35.53% 0.0581 -0.1662)
OKLCHoklch(35.53% 0.176 289.3)
XYZxyz(7.3975, 3.7261, 26.3107)
Luminance0.0373 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40188F #678F18
analogous
#182C8F #40188F #7B188F
triadic
#40188F #8F4018 #188F40
tetradic
#40188F #8F182C #678F18 #188F7B
square
#40188F #8F182C #678F18 #188F7B
split-complementary
#40188F #8F7B18 #2C8F18
monochromatic
#110626 #290F5B #40188F #5721C3 #7742DF

Accessibility & contrast

On white

12.03
#40188F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.75
#40188F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40188F
12.03:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40188F#FFFFFF#000000##FFFFFF
##40188F1.0012.031.7512.03
#FFFFFF12.031.0021.001.00
#0000001.7521.001.0021.00
##FFFFFF12.031.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003992
Deuteranopia (green-blind)
#00338D
Tritanopia (blue-blind)
#203C55
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #40188f;
/* rgb */ color: rgb(64, 24, 143);
/* oklch */ color: oklch(35.5% 0.176 289.3);
Tailwind
colors: {
  custom: {
    50: '#7f5bb1',
    500: '#40188f',
    950: '#000000',
  },
}
SCSS
$custom: #40188f;
$custom-light: #7f5bb1;
$custom-dark: #000000;
JSON
{
  "hex": "#40188f",
  "rgb": {
    "r": 64,
    "g": 24,
    "b": 143
  },
  "hsl": {
    "h": 260.168,
    "s": 71.257,
    "l": 32.745
  },
  "oklch": {
    "l": 0.35532,
    "c": 0.17605,
    "h": 289.3
  },
  "luminance": 0.03726
}

Semantic roles & 50–950 ramp

primary
#40188F
secondary
#96C043
accent
#EE3AB1
background
#F8F5FB
surface
#EFE9F6
border
#CAC5D0
text
#0B0411
muted
#7C7980

Preview Lab

Preview with #40188F

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

Preview Lab → · Contrast checker → · Palette generator →

#40188F Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva