#31298B#31298B

#31298B is a dark, vivid blue. Relative luminance 0.041; OKLCH L 35.9% C 0.155 H 278.8°. Best body text is #FFFFFF at 11.53:1 contrast (WCAG AA passes).

Color values

HEX#31298B
RGBrgb(49, 41, 139)
HSLhsl(245, 54%, 35%)
HSVhsv(245, 71%, 55%)
CMYKcmyk(64.7%, 70.5%, 0%, 45.5%)
CIE-LABlab(24.01, 34.29, -53.26)
CIE-LCHlch(24.01, 63.34, 302.77°)
OKLaboklab(35.95% 0.0238 -0.1536)
OKLCHoklch(35.95% 0.155 278.8)
XYZxyz(6.7183, 4.1024, 24.8589)
Luminance0.0410 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31298B #838B29
analogous
#29528B #31298B #62298B
triadic
#31298B #8B3129 #298B31
tetradic
#31298B #8B2952 #838B29 #298B62
square
#31298B #8B2952 #838B29 #298B62
split-complementary
#31298B #8B6229 #528B29
monochromatic
#100D2C #201B5C #31298B #4237BA #685FD0

Accessibility & contrast

On white

11.53
#31298B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.82
#31298B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31298B
11.53:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31298B#FFFFFF#000000##FFFFFF
##31298B1.0011.531.8211.53
#FFFFFF11.531.0021.001.00
#0000001.8221.001.0021.00
##FFFFFF11.531.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003D8E
Deuteranopia (green-blind)
#003589
Tritanopia (blue-blind)
#004356
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #31298b;
/* rgb */ color: rgb(49, 41, 139);
/* oklch */ color: oklch(35.9% 0.155 278.8);
Tailwind
colors: {
  custom: {
    50: '#7564ae',
    500: '#31298b',
    950: '#000000',
  },
}
SCSS
$custom: #31298b;
$custom-light: #7564ae;
$custom-dark: #000000;
JSON
{
  "hex": "#31298b",
  "rgb": {
    "r": 49,
    "g": 41,
    "b": 139
  },
  "hsl": {
    "h": 244.898,
    "s": 54.444,
    "l": 35.294
  },
  "oklch": {
    "l": 0.35945,
    "c": 0.15544,
    "h": 278.8
  },
  "luminance": 0.04103
}

Semantic roles & 50–950 ramp

primary
#31298B
secondary
#AEB55B
accent
#DE4AD2
background
#F7F6FA
surface
#EEEBF4
border
#C9C6CE
text
#090510
muted
#7B7A7F

Preview Lab

Preview with #31298B

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

Preview Lab → · Contrast checker → · Palette generator →

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