#271F88#271F88

#271F88 is a dark, vivid blue. Relative luminance 0.032; OKLCH L 33.4% C 0.165 H 276.0°. Best body text is #FFFFFF at 12.82:1 contrast (WCAG AA passes).

Color values

HEX#271F88
RGBrgb(39, 31, 136)
HSLhsl(245, 63%, 33%)
HSVhsv(245, 77%, 53%)
CMYKcmyk(71.3%, 77.2%, 0%, 46.7%)
CIE-LABlab(20.78, 37.95, -56.72)
CIE-LCHlch(20.78, 68.25, 303.79°)
OKLaboklab(33.35% 0.0173 -0.164)
OKLCHoklch(33.35% 0.165 276)
XYZxyz(5.7692, 3.1883, 23.5992)
Luminance0.0319 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#271F88 #80881F
analogous
#1F4C88 #271F88 #5B1F88
triadic
#271F88 #88271F #1F8827
tetradic
#271F88 #881F4C #80881F #1F885B
square
#271F88 #881F4C #80881F #1F885B
split-complementary
#271F88 #885B1F #4C881F
monochromatic
#0A0824 #191456 #271F88 #352ABA #564BD6

Accessibility & contrast

On white

12.82
#271F88 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.64
#271F88 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #271F88
12.82:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##271F88#FFFFFF#000000##FFFFFF
##271F881.0012.821.6412.82
#FFFFFF12.821.0021.001.00
#0000001.6421.001.0021.00
##FFFFFF12.821.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00368B
Deuteranopia (green-blind)
#002D86
Tritanopia (blue-blind)
#003E52
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #271f88;
/* rgb */ color: rgb(39, 31, 136);
/* oklch */ color: oklch(33.4% 0.165 276.0);
Tailwind
colors: {
  custom: {
    50: '#715dac',
    500: '#271f88',
    950: '#000000',
  },
}
SCSS
$custom: #271f88;
$custom-light: #715dac;
$custom-dark: #000000;
JSON
{
  "hex": "#271f88",
  "rgb": {
    "r": 39,
    "g": 31,
    "b": 136
  },
  "hsl": {
    "h": 244.571,
    "s": 62.874,
    "l": 32.745
  },
  "oklch": {
    "l": 0.33354,
    "c": 0.16486,
    "h": 276
  },
  "luminance": 0.03189
}

Semantic roles & 50–950 ramp

primary
#271F88
secondary
#B0B94A
accent
#E642D9
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #271F88

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

Preview Lab → · Contrast checker → · Palette generator →

#271F88 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva