#271F87#271F87

#271F87 is a dark, vivid blue. Relative luminance 0.032; OKLCH L 33.2% C 0.164 H 276.2°. Best body text is #FFFFFF at 12.87:1 contrast (WCAG AA passes).

Color values

HEX#271F87
RGBrgb(39, 31, 135)
HSLhsl(245, 63%, 33%)
HSVhsv(245, 77%, 53%)
CMYKcmyk(71.1%, 77%, 0%, 47.1%)
CIE-LABlab(20.67, 37.62, -56.27)
CIE-LCHlch(20.67, 67.68, 303.76°)
OKLaboklab(33.25% 0.0175 -0.1626)
OKLCHoklch(33.25% 0.164 276.2)
XYZxyz(5.6984, 3.1601, 23.2266)
Luminance0.0316 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#271F87 #7F871F
analogous
#1F4B87 #271F87 #5B1F87
triadic
#271F87 #87271F #1F8727
tetradic
#271F87 #871F4B #7F871F #1F875B
square
#271F87 #871F4B #7F871F #1F875B
split-complementary
#271F87 #875B1F #4B871F
monochromatic
#0A0823 #191455 #271F87 #352AB9 #554BD6

Accessibility & contrast

On white

12.87
#271F87 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.63
#271F87 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #271F87
12.87:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##271F87#FFFFFF#000000##FFFFFF
##271F871.0012.871.6312.87
#FFFFFF12.871.0021.001.00
#0000001.6321.001.0021.00
##FFFFFF12.871.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00368A
Deuteranopia (green-blind)
#002D85
Tritanopia (blue-blind)
#003D51
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #271f87;
/* rgb */ color: rgb(39, 31, 135);
/* oklch */ color: oklch(33.2% 0.164 276.2);
Tailwind
colors: {
  custom: {
    50: '#705dab',
    500: '#271f87',
    950: '#000000',
  },
}
SCSS
$custom: #271f87;
$custom-light: #705dab;
$custom-dark: #000000;
JSON
{
  "hex": "#271f87",
  "rgb": {
    "r": 39,
    "g": 31,
    "b": 135
  },
  "hsl": {
    "h": 244.615,
    "s": 62.651,
    "l": 32.549
  },
  "oklch": {
    "l": 0.33245,
    "c": 0.16359,
    "h": 276.2
  },
  "luminance": 0.03161
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #271F87

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

Preview Lab → · Contrast checker → · Palette generator →

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