#271F8C#271F8C

#271F8C is a dark, vivid blue. Relative luminance 0.033; OKLCH L 33.8% C 0.170 H 275.5°. Best body text is #FFFFFF at 12.64:1 contrast (WCAG AA passes).

Color values

HEX#271F8C
RGBrgb(39, 31, 140)
HSLhsl(244, 64%, 34%)
HSVhsv(244, 78%, 55%)
CMYKcmyk(72.1%, 77.9%, 0%, 45.1%)
CIE-LABlab(21.22, 39.29, -58.49)
CIE-LCHlch(21.22, 70.46, 303.89°)
OKLaboklab(33.8% 0.0164 -0.1691)
OKLCHoklch(33.8% 0.17 275.5)
XYZxyz(6.0588, 3.3042, 25.1243)
Luminance0.0331 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#271F8C #848C1F
analogous
#1F4D8C #271F8C #5D1F8C
triadic
#271F8C #8C271F #1F8C27
tetradic
#271F8C #8C1F4D #848C1F #1F8C5D
square
#271F8C #8C1F4D #848C1F #1F8C5D
split-complementary
#271F8C #8C5D1F #4D8C1F
monochromatic
#0B0928 #19145A #271F8C #352ABE #584ED8

Accessibility & contrast

On white

12.64
#271F8C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.66
#271F8C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #271F8C
12.64:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##271F8C#FFFFFF#000000##FFFFFF
##271F8C1.0012.641.6612.64
#FFFFFF12.641.0021.001.00
#0000001.6621.001.0021.00
##FFFFFF12.641.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00388F
Deuteranopia (green-blind)
#002E8A
Tritanopia (blue-blind)
#003F54
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #271f8c;
/* rgb */ color: rgb(39, 31, 140);
/* oklch */ color: oklch(33.8% 0.170 275.5);
Tailwind
colors: {
  custom: {
    50: '#725daf',
    500: '#271f8c',
    950: '#000000',
  },
}
SCSS
$custom: #271f8c;
$custom-light: #725daf;
$custom-dark: #000000;
JSON
{
  "hex": "#271f8c",
  "rgb": {
    "r": 39,
    "g": 31,
    "b": 140
  },
  "hsl": {
    "h": 244.404,
    "s": 63.743,
    "l": 33.529
  },
  "oklch": {
    "l": 0.33796,
    "c": 0.16991,
    "h": 275.5
  },
  "luminance": 0.03305
}

Semantic roles & 50–950 ramp

primary
#271F8C
secondary
#B2BB4C
accent
#E741DB
background
#F7F5FA
surface
#EDE9F5
border
#C8C5CF
text
#090410
muted
#7B797F

Preview Lab

Preview with #271F8C

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

Preview Lab → · Contrast checker → · Palette generator →

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