#40307C#40307C

#40307C is a dark, vivid violet. Relative luminance 0.047; OKLCH L 37.1% C 0.123 H 288.6°. Best body text is #FFFFFF at 10.87:1 contrast (WCAG AA passes).

Color values

HEX#40307C
RGBrgb(64, 48, 124)
HSLhsl(253, 44%, 34%)
HSVhsv(253, 61%, 49%)
CMYKcmyk(48.4%, 61.3%, 0%, 51.4%)
CIE-LABlab(25.74, 27.74, -40.97)
CIE-LCHlch(25.74, 49.48, 304.10°)
OKLaboklab(37.14% 0.0394 -0.117)
OKLCHoklch(37.14% 0.123 288.6)
XYZxyz(6.8084, 4.6589, 19.6054)
Luminance0.0466 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40307C #6C7C30
analogous
#30467C #40307C #66307C
triadic
#40307C #7C4030 #307C40
tetradic
#40307C #7C3046 #6C7C30 #307C66
square
#40307C #7C3046 #6C7C30 #307C66
split-complementary
#40307C #7C6630 #467C30
monochromatic
#120E24 #291F50 #40307C #5741A8 #7864C3

Accessibility & contrast

On white

10.87
#40307C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.93
#40307C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40307C
10.87:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40307C#FFFFFF#000000##FFFFFF
##40307C1.0010.871.9310.87
#FFFFFF10.871.0021.001.00
#0000001.9321.001.0021.00
##FFFFFF10.871.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003F7E
Deuteranopia (green-blind)
#003B7A
Tritanopia (blue-blind)
#2D4151
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #40307c;
/* rgb */ color: rgb(64, 48, 124);
/* oklch */ color: oklch(37.1% 0.123 288.6);
Tailwind
colors: {
  custom: {
    50: '#7a69a2',
    500: '#40307c',
    950: '#000000',
  },
}
SCSS
$custom: #40307c;
$custom-light: #7a69a2;
$custom-dark: #000000;
JSON
{
  "hex": "#40307c",
  "rgb": {
    "r": 64,
    "g": 48,
    "b": 124
  },
  "hsl": {
    "h": 252.632,
    "s": 44.186,
    "l": 33.725
  },
  "oklch": {
    "l": 0.37144,
    "c": 0.12347,
    "h": 288.6
  },
  "luminance": 0.04659
}

Semantic roles & 50–950 ramp

primary
#40307C
secondary
#9AAA5E
accent
#D454B9
background
#F7F6FA
surface
#EEEBF4
border
#C9C6CE
text
#0A060F
muted
#7C7A7F

Preview Lab

Preview with #40307C

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

Preview Lab → · Contrast checker → · Palette generator →

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