#40248B#40248B

#40248B is a dark, vivid violet. Relative luminance 0.042; OKLCH L 36.5% C 0.159 H 288.3°. Best body text is #FFFFFF at 11.39:1 contrast (WCAG AA passes).

Color values

HEX#40248B
RGBrgb(64, 36, 139)
HSLhsl(256, 59%, 34%)
HSVhsv(256, 74%, 55%)
CMYKcmyk(54%, 74.1%, 0%, 45.5%)
CIE-LABlab(24.37, 39.53, -52.61)
CIE-LCHlch(24.37, 65.80, 306.92°)
OKLaboklab(36.55% 0.0501 -0.1512)
OKLCHoklch(36.55% 0.159 288.3)
XYZxyz(7.4041, 4.2155, 24.8446)
Luminance0.0422 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40248B #6F8B24
analogous
#243B8B #40248B #74248B
triadic
#40248B #8B4024 #248B40
tetradic
#40248B #8B243B #6F8B24 #248B74
square
#40248B #8B243B #6F8B24 #248B74
split-complementary
#40248B #8B7424 #3B8B24
monochromatic
#130B2A #2A175A #40248B #5631BC #7856D3

Accessibility & contrast

On white

11.39
#40248B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.84
#40248B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40248B
11.39:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40248B#FFFFFF#000000##FFFFFF
##40248B1.0011.391.8411.39
#FFFFFF11.391.0021.001.00
#0000001.8421.001.0021.00
##FFFFFF11.391.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C8E
Deuteranopia (green-blind)
#003789
Tritanopia (blue-blind)
#234055
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #40248b;
/* rgb */ color: rgb(64, 36, 139);
/* oklch */ color: oklch(36.5% 0.159 288.3);
Tailwind
colors: {
  custom: {
    50: '#7d62ae',
    500: '#40248b',
    950: '#000000',
  },
}
SCSS
$custom: #40248b;
$custom-light: #7d62ae;
$custom-dark: #000000;
JSON
{
  "hex": "#40248b",
  "rgb": {
    "r": 64,
    "g": 36,
    "b": 139
  },
  "hsl": {
    "h": 256.311,
    "s": 58.857,
    "l": 34.314
  },
  "oklch": {
    "l": 0.3655,
    "c": 0.15926,
    "h": 288.3
  },
  "luminance": 0.04216
}

Semantic roles & 50–950 ramp

primary
#40248B
secondary
#9CB753
accent
#E246B8
background
#F8F5FA
surface
#EFEAF4
border
#CAC6CE
text
#0B0510
muted
#7C797F

Preview Lab

Preview with #40248B

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

Preview Lab → · Contrast checker → · Palette generator →

#40248B Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva