#313172#313172

#313172 is a dark, moderate blue. Relative luminance 0.041; OKLCH L 35.2% C 0.109 H 279.2°. Best body text is #FFFFFF at 11.58:1 contrast (WCAG AA passes).

Color values

HEX#313172
RGBrgb(49, 49, 114)
HSLhsl(240, 40%, 32%)
HSVhsv(240, 57%, 45%)
CMYKcmyk(57%, 57%, 0%, 55.3%)
CIE-LABlab(23.88, 20.32, -37.68)
CIE-LCHlch(23.88, 42.81, 298.34°)
OKLaboklab(35.19% 0.0175 -0.1078)
OKLCHoklch(35.19% 0.109 279.2)
XYZxyz(5.4012, 4.0642, 16.4162)
Luminance0.0406 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#313172 #727231
analogous
#315272 #313172 #523172
triadic
#313172 #723131 #317231
tetradic
#313172 #723152 #727231 #317252
square
#313172 #723152 #727231 #317252
split-complementary
#313172 #725231 #527231
monochromatic
#0C0C1C #1F1F47 #313172 #43439D #6262BB

Accessibility & contrast

On white

11.58
#313172 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.81
#313172 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #313172
11.58:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##313172#FFFFFF#000000##FFFFFF
##3131721.0011.581.8111.58
#FFFFFF11.581.0021.001.00
#0000001.8121.001.0021.00
##FFFFFF11.581.0021.001.00

Color blindness preview

Protanopia (red-blind)
#083B74
Deuteranopia (green-blind)
#003671
Tritanopia (blue-blind)
#12404C
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #313172;
/* rgb */ color: rgb(49, 49, 114);
/* oklch */ color: oklch(35.2% 0.109 279.2);
Tailwind
colors: {
  custom: {
    50: '#6f699b',
    500: '#313172',
    950: '#000000',
  },
}
SCSS
$custom: #313172;
$custom-light: #6f699b;
$custom-dark: #000000;
JSON
{
  "hex": "#313172",
  "rgb": {
    "r": 49,
    "g": 49,
    "b": 114
  },
  "hsl": {
    "h": 240,
    "s": 39.877,
    "l": 31.961
  },
  "oklch": {
    "l": 0.35193,
    "c": 0.10922,
    "h": 279.2
  },
  "luminance": 0.04064
}

Semantic roles & 50–950 ramp

primary
#313172
secondary
#A3A35C
accent
#D058D0
background
#F7F6F9
surface
#EDEBF2
border
#C8C6CC
text
#08060E
muted
#7B7A7E

Preview Lab

Preview with #313172

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

Preview Lab → · Contrast checker → · Palette generator →

#313172 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva