#313271#313271

#313271 is a dark, moderate blue. Relative luminance 0.041; OKLCH L 35.3% C 0.106 H 278.8°. Best body text is #FFFFFF at 11.51:1 contrast (WCAG AA passes).

Color values

HEX#313271
RGBrgb(49, 50, 113)
HSLhsl(239, 40%, 32%)
HSVhsv(239, 57%, 44%)
CMYKcmyk(56.6%, 55.8%, 0%, 55.7%)
CIE-LABlab(24.08, 19.28, -36.72)
CIE-LCHlch(24.08, 41.48, 297.71°)
OKLaboklab(35.32% 0.0162 -0.105)
OKLCHoklch(35.32% 0.106 278.8)
XYZxyz(5.3869, 4.1261, 16.1321)
Luminance0.0413 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#313271 #717031
analogous
#315271 #313271 #503171
triadic
#313271 #713132 #327131
tetradic
#313271 #713152 #717031 #317150
square
#313271 #713152 #717031 #317150
split-complementary
#313271 #715031 #527131
monochromatic
#0C0C1C #1E1F46 #313271 #44459C #6263BB

Accessibility & contrast

On white

11.51
#313271 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.83
#313271 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #313271
11.51:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##313271#FFFFFF#000000##FFFFFF
##3132711.0011.511.8311.51
#FFFFFF11.511.0021.001.00
#0000001.8321.001.0021.00
##FFFFFF11.511.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0E3C73
Deuteranopia (green-blind)
#043770
Tritanopia (blue-blind)
#13404C
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #313271;
/* rgb */ color: rgb(49, 50, 113);
/* oklch */ color: oklch(35.3% 0.106 278.8);
Tailwind
colors: {
  custom: {
    50: '#6f699a',
    500: '#313271',
    950: '#000000',
  },
}
SCSS
$custom: #313271;
$custom-light: #6f699a;
$custom-dark: #000000;
JSON
{
  "hex": "#313271",
  "rgb": {
    "r": 49,
    "g": 50,
    "b": 113
  },
  "hsl": {
    "h": 239.063,
    "s": 39.506,
    "l": 31.765
  },
  "oklch": {
    "l": 0.3532,
    "c": 0.10622,
    "h": 278.8
  },
  "luminance": 0.04126
}

Semantic roles & 50–950 ramp

primary
#313271
secondary
#A2A15C
accent
#CE58CF
background
#F6F6F9
surface
#ECEBF2
border
#C7C6CC
text
#08060E
muted
#7B7A7E

Preview Lab

Preview with #313271

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

Preview Lab → · Contrast checker → · Palette generator →

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