#271F81#271F81

#271F81 is a dark, vivid blue. Relative luminance 0.030; OKLCH L 32.6% C 0.156 H 276.9°. Best body text is #FFFFFF at 13.13:1 contrast (WCAG AA passes).

Color values

HEX#271F81
RGBrgb(39, 31, 129)
HSLhsl(245, 61%, 31%)
HSVhsv(245, 76%, 51%)
CMYKcmyk(69.8%, 76%, 0%, 49.4%)
CIE-LABlab(20.03, 35.59, -53.56)
CIE-LCHlch(20.03, 64.30, 303.60°)
OKLaboklab(32.59% 0.0189 -0.1547)
OKLCHoklch(32.59% 0.156 276.9)
XYZxyz(5.2878, 2.9958, 21.0642)
Luminance0.0300 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#271F81 #79811F
analogous
#1F4881 #271F81 #581F81
triadic
#271F81 #81271F #1F8127
tetradic
#271F81 #811F48 #79811F #1F8158
square
#271F81 #811F48 #79811F #1F8158
split-complementary
#271F81 #81581F #48811F
monochromatic
#09071E #181350 #271F81 #362BB2 #5347D3

Accessibility & contrast

On white

13.13
#271F81 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.60
#271F81 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #271F81
13.13:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##271F81#FFFFFF#000000##FFFFFF
##271F811.0013.131.6013.13
#FFFFFF13.131.0021.001.00
#0000001.6021.001.0021.00
##FFFFFF13.131.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003484
Deuteranopia (green-blind)
#002C7F
Tritanopia (blue-blind)
#003B4E
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #271f81;
/* rgb */ color: rgb(39, 31, 129);
/* oklch */ color: oklch(32.6% 0.156 276.9);
Tailwind
colors: {
  custom: {
    50: '#6f5ca7',
    500: '#271f81',
    950: '#000000',
  },
}
SCSS
$custom: #271f81;
$custom-light: #6f5ca7;
$custom-dark: #000000;
JSON
{
  "hex": "#271f81",
  "rgb": {
    "r": 39,
    "g": 31,
    "b": 129
  },
  "hsl": {
    "h": 244.898,
    "s": 61.25,
    "l": 31.373
  },
  "oklch": {
    "l": 0.32594,
    "c": 0.15588,
    "h": 276.9
  },
  "luminance": 0.02996
}

Semantic roles & 50–950 ramp

primary
#271F81
secondary
#ABB448
accent
#E443D7
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#080410
muted
#7B797F

Preview Lab

Preview with #271F81

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

Preview Lab → · Contrast checker → · Palette generator →

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