#271F8F#271F8F

#271F8F is a dark, vivid blue. Relative luminance 0.034; OKLCH L 34.1% C 0.174 H 275.2°. Best body text is #FFFFFF at 12.51:1 contrast (WCAG AA passes).

Color values

HEX#271F8F
RGBrgb(39, 31, 143)
HSLhsl(244, 64%, 34%)
HSVhsv(244, 78%, 56%)
CMYKcmyk(72.7%, 78.3%, 0%, 43.9%)
CIE-LABlab(21.56, 40.28, -59.81)
CIE-LCHlch(21.56, 72.11, 303.96°)
OKLaboklab(34.13% 0.0157 -0.1729)
OKLCHoklch(34.13% 0.174 275.2)
XYZxyz(6.2830, 3.3939, 26.3052)
Luminance0.0339 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#271F8F #878F1F
analogous
#1F4F8F #271F8F #5F1F8F
triadic
#271F8F #8F271F #1F8F27
tetradic
#271F8F #8F1F4F #878F1F #1F8F5F
square
#271F8F #8F1F4F #878F1F #1F8F5F
split-complementary
#271F8F #8F5F1F #4F8F1F
monochromatic
#0C092A #19145D #271F8F #352AC1 #594FD9

Accessibility & contrast

On white

12.51
#271F8F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.68
#271F8F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #271F8F
12.51:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##271F8F#FFFFFF#000000##FFFFFF
##271F8F1.0012.511.6812.51
#FFFFFF12.511.0021.001.00
#0000001.6821.001.0021.00
##FFFFFF12.511.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003992
Deuteranopia (green-blind)
#002F8D
Tritanopia (blue-blind)
#004056
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #271f8f;
/* rgb */ color: rgb(39, 31, 143);
/* oklch */ color: oklch(34.1% 0.174 275.2);
Tailwind
colors: {
  custom: {
    50: '#725db1',
    500: '#271f8f',
    950: '#000000',
  },
}
SCSS
$custom: #271f8f;
$custom-light: #725db1;
$custom-dark: #000000;
JSON
{
  "hex": "#271f8f",
  "rgb": {
    "r": 39,
    "g": 31,
    "b": 143
  },
  "hsl": {
    "h": 244.286,
    "s": 64.368,
    "l": 34.118
  },
  "oklch": {
    "l": 0.34129,
    "c": 0.17366,
    "h": 275.2
  },
  "luminance": 0.03394
}

Semantic roles & 50–950 ramp

primary
#271F8F
secondary
#B4BC4E
accent
#E740DB
background
#F7F5FB
surface
#EDE9F6
border
#C8C5D0
text
#090411
muted
#7B7980

Preview Lab

Preview with #271F8F

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

Preview Lab → · Contrast checker → · Palette generator →

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