#271F8E#271F8E

#271F8E is a dark, vivid blue. Relative luminance 0.034; OKLCH L 34.0% C 0.172 H 275.3°. Best body text is #FFFFFF at 12.55:1 contrast (WCAG AA passes).

Color values

HEX#271F8E
RGBrgb(39, 31, 142)
HSLhsl(244, 64%, 34%)
HSVhsv(244, 78%, 56%)
CMYKcmyk(72.5%, 78.2%, 0%, 44.3%)
CIE-LABlab(21.45, 39.95, -59.37)
CIE-LCHlch(21.45, 71.56, 303.94°)
OKLaboklab(34.02% 0.0159 -0.1717)
OKLCHoklch(34.02% 0.172 275.3)
XYZxyz(6.2076, 3.3637, 25.9081)
Luminance0.0336 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#271F8E #868E1F
analogous
#1F4F8E #271F8E #5F1F8E
triadic
#271F8E #8E271F #1F8E27
tetradic
#271F8E #8E1F4F #868E1F #1F8E5F
square
#271F8E #8E1F4F #868E1F #1F8E5F
split-complementary
#271F8E #8E5F1F #4F8E1F
monochromatic
#0B092A #19145C #271F8E #352AC0 #594FD9

Accessibility & contrast

On white

12.55
#271F8E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.67
#271F8E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #271F8E
12.55:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##271F8E#FFFFFF#000000##FFFFFF
##271F8E1.0012.551.6712.55
#FFFFFF12.551.0021.001.00
#0000001.6721.001.0021.00
##FFFFFF12.551.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003891
Deuteranopia (green-blind)
#002E8C
Tritanopia (blue-blind)
#004055
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #271f8e;
/* rgb */ color: rgb(39, 31, 142);
/* oklch */ color: oklch(34.0% 0.172 275.3);
Tailwind
colors: {
  custom: {
    50: '#725db0',
    500: '#271f8e',
    950: '#000000',
  },
}
SCSS
$custom: #271f8e;
$custom-light: #725db0;
$custom-dark: #000000;
JSON
{
  "hex": "#271f8e",
  "rgb": {
    "r": 39,
    "g": 31,
    "b": 142
  },
  "hsl": {
    "h": 244.324,
    "s": 64.162,
    "l": 33.922
  },
  "oklch": {
    "l": 0.34018,
    "c": 0.17242,
    "h": 275.3
  },
  "luminance": 0.03364
}

Semantic roles & 50–950 ramp

primary
#271F8E
secondary
#B4BB4D
accent
#E741DB
background
#F7F5FB
surface
#EDE9F6
border
#C8C5D0
text
#090411
muted
#7B7980

Preview Lab

Preview with #271F8E

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

Preview Lab → · Contrast checker → · Palette generator →

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