#40307F#40307F

#40307F is a dark, vivid violet. Relative luminance 0.047; OKLCH L 37.4% C 0.128 H 287.9°. Best body text is #FFFFFF at 10.78:1 contrast (WCAG AA passes).

Color values

HEX#40307F
RGBrgb(64, 48, 127)
HSLhsl(252, 45%, 34%)
HSVhsv(252, 62%, 50%)
CMYKcmyk(49.6%, 62.2%, 0%, 50.2%)
CIE-LABlab(25.97, 28.69, -42.49)
CIE-LCHlch(25.97, 51.27, 304.03°)
OKLaboklab(37.38% 0.0393 -0.1215)
OKLCHoklch(37.38% 0.128 287.9)
XYZxyz(7.0010, 4.7359, 20.6198)
Luminance0.0474 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40307F #6F7F30
analogous
#30487F #40307F #68307F
triadic
#40307F #7F4030 #307F40
tetradic
#40307F #7F3048 #6F7F30 #307F68
square
#40307F #7F3048 #6F7F30 #307F68
split-complementary
#40307F #7F6830 #487F30
monochromatic
#130E26 #2A1F53 #40307F #5641AB #7865C5

Accessibility & contrast

On white

10.78
#40307F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.95
#40307F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40307F
10.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40307F#FFFFFF#000000##FFFFFF
##40307F1.0010.781.9510.78
#FFFFFF10.781.0021.001.00
#0000001.9521.001.0021.00
##FFFFFF10.781.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003F82
Deuteranopia (green-blind)
#003B7D
Tritanopia (blue-blind)
#2B4252
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #40307f;
/* rgb */ color: rgb(64, 48, 127);
/* oklch */ color: oklch(37.4% 0.128 287.9);
Tailwind
colors: {
  custom: {
    50: '#7a69a5',
    500: '#40307f',
    950: '#000000',
  },
}
SCSS
$custom: #40307f;
$custom-light: #7a69a5;
$custom-dark: #000000;
JSON
{
  "hex": "#40307f",
  "rgb": {
    "r": 64,
    "g": 48,
    "b": 127
  },
  "hsl": {
    "h": 252.152,
    "s": 45.143,
    "l": 34.314
  },
  "oklch": {
    "l": 0.37384,
    "c": 0.12768,
    "h": 287.9
  },
  "luminance": 0.04736
}

Semantic roles & 50–950 ramp

primary
#40307F
secondary
#9CAC5F
accent
#D553BB
background
#F7F6FA
surface
#EEEBF4
border
#C9C6CE
text
#0A060F
muted
#7C7A7F

Preview Lab

Preview with #40307F

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

Preview Lab → · Contrast checker → · Palette generator →

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