#2F226B#2F226B

#2F226B is a dark, vivid violet. Relative luminance 0.028; OKLCH L 31.6% C 0.121 H 285.3°. Best body text is #FFFFFF at 13.44:1 contrast (WCAG AA passes).

Color values

HEX#2F226B
RGBrgb(47, 34, 107)
HSLhsl(251, 52%, 28%)
HSVhsv(251, 68%, 42%)
CMYKcmyk(56.1%, 68.2%, 0%, 58%)
CIE-LABlab(19.27, 27.49, -40.66)
CIE-LCHlch(19.27, 49.09, 304.06°)
OKLaboklab(31.57% 0.0319 -0.1167)
OKLCHoklch(31.57% 0.121 285.3)
XYZxyz(4.3974, 2.8097, 14.2177)
Luminance0.0281 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F226B #5E6B22
analogous
#22396B #2F226B #53226B
triadic
#2F226B #6B2F22 #226B2F
tetradic
#2F226B #6B2239 #5E6B22 #226B53
square
#2F226B #6B2239 #5E6B22 #226B53
split-complementary
#2F226B #6B5322 #396B22
monochromatic
#0A0717 #1B133D #2F226B #433199 #5B44C4

Accessibility & contrast

On white

13.44
#2F226B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.56
#2F226B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F226B
13.44:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F226B#FFFFFF#000000##FFFFFF
##2F226B1.0013.441.5613.44
#FFFFFF13.441.0021.001.00
#0000001.5621.001.0021.00
##FFFFFF13.441.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00316D
Deuteranopia (green-blind)
#002C6A
Tritanopia (blue-blind)
#163443
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #2f226b;
/* rgb */ color: rgb(47, 34, 107);
/* oklch */ color: oklch(31.6% 0.121 285.3);
Tailwind
colors: {
  custom: {
    50: '#6e5e96',
    500: '#2f226b',
    950: '#000000',
  },
}
SCSS
$custom: #2f226b;
$custom-light: #6e5e96;
$custom-dark: #000000;
JSON
{
  "hex": "#2f226b",
  "rgb": {
    "r": 47,
    "g": 34,
    "b": 107
  },
  "hsl": {
    "h": 250.685,
    "s": 51.773,
    "l": 27.647
  },
  "oklch": {
    "l": 0.3157,
    "c": 0.12101,
    "h": 285.3
  },
  "luminance": 0.0281
}

Semantic roles & 50–950 ramp

primary
#2F226B
secondary
#909F4A
accent
#DB4DC2
background
#F6F5F9
surface
#ECE9F2
border
#C7C5CC
text
#08040D
muted
#7B797E

Preview Lab

Preview with #2F226B

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

Preview Lab → · Contrast checker → · Palette generator →

#2F226B Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva