#271F72#271F72

#271F72 is a dark, vivid blue. Relative luminance 0.026; OKLCH L 31.0% C 0.136 H 279.2°. Best body text is #FFFFFF at 13.77:1 contrast (WCAG AA passes).

Color values

HEX#271F72
RGBrgb(39, 31, 114)
HSLhsl(246, 57%, 28%)
HSVhsv(246, 73%, 45%)
CMYKcmyk(65.8%, 72.8%, 0%, 55.3%)
CIE-LABlab(18.48, 30.41, -46.52)
CIE-LCHlch(18.48, 55.58, 303.18°)
OKLaboklab(31.02% 0.0219 -0.1342)
OKLCHoklch(31.02% 0.136 279.2)
XYZxyz(4.3630, 2.6259, 16.1933)
Luminance0.0263 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#271F72 #6A721F
analogous
#1F4072 #271F72 #501F72
triadic
#271F72 #72271F #1F7227
tetradic
#271F72 #721F40 #6A721F #1F7250
square
#271F72 #721F40 #6A721F #1F7250
split-complementary
#271F72 #72501F #40721F
monochromatic
#080718 #171242 #271F72 #372CA2 #4E40CB

Accessibility & contrast

On white

13.77
#271F72 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.53
#271F72 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #271F72
13.77:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##271F72#FFFFFF#000000##FFFFFF
##271F721.0013.771.5313.77
#FFFFFF13.771.0021.001.00
#0000001.5321.001.0021.00
##FFFFFF13.771.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003075
Deuteranopia (green-blind)
#002A70
Tritanopia (blue-blind)
#003546
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #271f72;
/* rgb */ color: rgb(39, 31, 114);
/* oklch */ color: oklch(31.0% 0.136 279.2);
Tailwind
colors: {
  custom: {
    50: '#6c5c9b',
    500: '#271f72',
    950: '#000000',
  },
}
SCSS
$custom: #271f72;
$custom-light: #6c5c9b;
$custom-dark: #000000;
JSON
{
  "hex": "#271f72",
  "rgb": {
    "r": 39,
    "g": 31,
    "b": 114
  },
  "hsl": {
    "h": 245.783,
    "s": 57.241,
    "l": 28.431
  },
  "oklch": {
    "l": 0.31022,
    "c": 0.13594,
    "h": 279.2
  },
  "luminance": 0.02626
}

Semantic roles & 50–950 ramp

primary
#271F72
secondary
#9DA647
accent
#E047D2
background
#F6F5F9
surface
#ECE9F2
border
#C7C5CC
text
#07040E
muted
#7A797E

Preview Lab

Preview with #271F72

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

Preview Lab → · Contrast checker → · Palette generator →

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