#271F8D#271F8D

#271F8D is a dark, vivid blue. Relative luminance 0.033; OKLCH L 33.9% C 0.171 H 275.4°. Best body text is #FFFFFF at 12.60:1 contrast (WCAG AA passes).

Color values

HEX#271F8D
RGBrgb(39, 31, 141)
HSLhsl(244, 64%, 34%)
HSVhsv(244, 78%, 55%)
CMYKcmyk(72.3%, 78%, 0%, 44.7%)
CIE-LABlab(21.33, 39.62, -58.93)
CIE-LCHlch(21.33, 71.01, 303.91°)
OKLaboklab(33.91% 0.0161 -0.1704)
OKLCHoklch(33.91% 0.171 275.4)
XYZxyz(6.1328, 3.3338, 25.5144)
Luminance0.0333 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#271F8D #858D1F
analogous
#1F4E8D #271F8D #5E1F8D
triadic
#271F8D #8D271F #1F8D27
tetradic
#271F8D #8D1F4E #858D1F #1F8D5E
square
#271F8D #8D1F4E #858D1F #1F8D5E
split-complementary
#271F8D #8D5E1F #4E8D1F
monochromatic
#0B0929 #19145B #271F8D #352ABF #584ED8

Accessibility & contrast

On white

12.60
#271F8D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #271F8D
12.60:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##271F8D#FFFFFF#000000##FFFFFF
##271F8D1.0012.601.6712.60
#FFFFFF12.601.0021.001.00
#0000001.6721.001.0021.00
##FFFFFF12.601.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003890
Deuteranopia (green-blind)
#002E8B
Tritanopia (blue-blind)
#003F55
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #271f8d;
/* rgb */ color: rgb(39, 31, 141);
/* oklch */ color: oklch(33.9% 0.171 275.4);
Tailwind
colors: {
  custom: {
    50: '#725db0',
    500: '#271f8d',
    950: '#000000',
  },
}
SCSS
$custom: #271f8d;
$custom-light: #725db0;
$custom-dark: #000000;
JSON
{
  "hex": "#271f8d",
  "rgb": {
    "r": 39,
    "g": 31,
    "b": 141
  },
  "hsl": {
    "h": 244.364,
    "s": 63.953,
    "l": 33.725
  },
  "oklch": {
    "l": 0.33907,
    "c": 0.17116,
    "h": 275.4
  },
  "luminance": 0.03334
}

Semantic roles & 50–950 ramp

primary
#271F8D
secondary
#B3BB4D
accent
#E741DB
background
#F7F5FA
surface
#EDE9F5
border
#C8C5CF
text
#090411
muted
#7B7980

Preview Lab

Preview with #271F8D

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

Preview Lab → · Contrast checker → · Palette generator →

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