#31257B#31257B

#31257B is a dark, vivid blue. Relative luminance 0.034; OKLCH L 33.8% C 0.139 H 282.3°. Best body text is #FFFFFF at 12.49:1 contrast (WCAG AA passes).

Color values

HEX#31257B
RGBrgb(49, 37, 123)
HSLhsl(248, 54%, 31%)
HSVhsv(248, 70%, 48%)
CMYKcmyk(60.2%, 69.9%, 0%, 51.8%)
CIE-LABlab(21.60, 31.35, -47.13)
CIE-LCHlch(21.60, 56.61, 303.63°)
OKLaboklab(33.75% 0.0297 -0.1356)
OKLCHoklch(33.75% 0.139 282.3)
XYZxyz(5.5022, 3.4058, 19.1025)
Luminance0.0341 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31257B #6F7B25
analogous
#25447B #31257B #5C257B
triadic
#31257B #7B3125 #257B31
tetradic
#31257B #7B2544 #6F7B25 #257B5C
square
#31257B #7B2544 #6F7B25 #257B5C
split-complementary
#31257B #7B5C25 #447B25
monochromatic
#0C091D #1E174C #31257B #4433AA #6150CA

Accessibility & contrast

On white

12.49
#31257B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.68
#31257B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31257B
12.49:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31257B#FFFFFF#000000##FFFFFF
##31257B1.0012.491.6812.49
#FFFFFF12.491.0021.001.00
#0000001.6821.001.0021.00
##FFFFFF12.491.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00377E
Deuteranopia (green-blind)
#003179
Tritanopia (blue-blind)
#063B4C
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #31257b;
/* rgb */ color: rgb(49, 37, 123);
/* oklch */ color: oklch(33.8% 0.139 282.3);
Tailwind
colors: {
  custom: {
    50: '#7260a2',
    500: '#31257b',
    950: '#000000',
  },
}
SCSS
$custom: #31257b;
$custom-light: #7260a2;
$custom-dark: #000000;
JSON
{
  "hex": "#31257b",
  "rgb": {
    "r": 49,
    "g": 37,
    "b": 123
  },
  "hsl": {
    "h": 248.372,
    "s": 53.75,
    "l": 31.373
  },
  "oklch": {
    "l": 0.33753,
    "c": 0.13886,
    "h": 282.3
  },
  "luminance": 0.03406
}

Semantic roles & 50–950 ramp

primary
#31257B
secondary
#A0AD4F
accent
#DD4BC9
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09050F
muted
#7B797F

Preview Lab

Preview with #31257B

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

Preview Lab → · Contrast checker → · Palette generator →

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