#271F52#271F52

#271F52 is a dark, moderate blue. Relative luminance 0.020; OKLCH L 28.0% C 0.089 H 286.3°. Best body text is #FFFFFF at 14.96:1 contrast (WCAG AA passes).

Color values

HEX#271F52
RGBrgb(39, 31, 82)
HSLhsl(249, 45%, 22%)
HSVhsv(249, 62%, 32%)
CMYKcmyk(52.4%, 62.2%, 0%, 67.8%)
CIE-LABlab(15.59, 19.14, -30.06)
CIE-LCHlch(15.59, 35.64, 302.49°)
OKLaboklab(28.03% 0.0251 -0.0858)
OKLCHoklch(28.03% 0.089 286.3)
XYZxyz(2.8492, 2.0204, 8.2208)
Luminance0.0202 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#271F52 #4A521F
analogous
#1F3152 #271F52 #411F52
triadic
#271F52 #52271F #1F5227
tetradic
#271F52 #521F31 #4A521F #1F5241
square
#271F52 #521F31 #4A521F #1F5241
split-complementary
#271F52 #52411F #31521F
monochromatic
#0B0816 #120E26 #271F52 #3C307E #5141AB

Accessibility & contrast

On white

14.96
#271F52 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.40
#271F52 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #271F52
14.96:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##271F52#FFFFFF#000000##FFFFFF
##271F521.0014.961.4014.96
#FFFFFF14.961.0021.001.00
#0000001.4021.001.0021.00
##FFFFFF14.961.0021.001.00

Color blindness preview

Protanopia (red-blind)
#012854
Deuteranopia (green-blind)
#002551
Tritanopia (blue-blind)
#182A35
Achromatopsia (no color)
#272727

Design tokens & code

CSS
--color: #271f52;
/* rgb */ color: rgb(39, 31, 82);
/* oklch */ color: oklch(28.0% 0.089 286.3);
Tailwind
colors: {
  custom: {
    50: '#655b83',
    500: '#271f52',
    950: '#000000',
  },
}
SCSS
$custom: #271f52;
$custom-light: #655b83;
$custom-dark: #000000;
JSON
{
  "hex": "#271f52",
  "rgb": {
    "r": 39,
    "g": 31,
    "b": 82
  },
  "hsl": {
    "h": 249.412,
    "s": 45.133,
    "l": 22.157
  },
  "oklch": {
    "l": 0.28026,
    "c": 0.08943,
    "h": 286.3
  },
  "luminance": 0.02021
}

Semantic roles & 50–950 ramp

primary
#271F52
secondary
#7D8746
accent
#D553C0
background
#F6F5F8
surface
#EBE9EF
border
#C6C5CA
text
#06040A
muted
#7A797C

Preview Lab

Preview with #271F52

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

Preview Lab → · Contrast checker → · Palette generator →

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