#2F1978#2F1978

#2F1978 is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.5% C 0.149 H 284.5°. Best body text is #FFFFFF at 13.71:1 contrast (WCAG AA passes).

Color values

HEX#2F1978
RGBrgb(47, 25, 120)
HSLhsl(254, 66%, 28%)
HSVhsv(254, 79%, 47%)
CMYKcmyk(60.8%, 79.2%, 0%, 52.9%)
CIE-LABlab(18.61, 37.03, -50.14)
CIE-LCHlch(18.61, 62.33, 306.45°)
OKLaboklab(31.49% 0.0374 -0.1445)
OKLCHoklch(31.49% 0.149 284.5)
XYZxyz(4.9090, 2.6554, 18.0195)
Luminance0.0266 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#2F1978 #627819
analogous
#193278 #2F1978 #5E1978
triadic
#2F1978 #782F19 #19782F
tetradic
#2F1978 #781932 #627819 #19785E
square
#2F1978 #781932 #627819 #19785E
split-complementary
#2F1978 #785E19 #327819
monochromatic
#0A0519 #1B0E45 #2F1978 #4324AB #5B36D5

Accessibility & contrast

On white

13.71
#2F1978 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.53
#2F1978 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #2F1978
13.71:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##2F1978#FFFFFF#000000##FFFFFF
##2F19781.0013.711.5313.71
#FFFFFF13.711.0021.001.00
#0000001.5321.001.0021.00
##FFFFFF13.711.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00307B
Deuteranopia (green-blind)
#002A76
Tritanopia (blue-blind)
#043448
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #2f1978;
/* rgb */ color: rgb(47, 25, 120);
/* oklch */ color: oklch(31.5% 0.149 284.5);
Tailwind
colors: {
  custom: {
    50: '#7159a0',
    500: '#2f1978',
    950: '#000000',
  },
}
SCSS
$custom: #2f1978;
$custom-light: #7159a0;
$custom-dark: #000000;
JSON
{
  "hex": "#2f1978",
  "rgb": {
    "r": 47,
    "g": 25,
    "b": 120
  },
  "hsl": {
    "h": 253.895,
    "s": 65.517,
    "l": 28.431
  },
  "oklch": {
    "l": 0.31486,
    "c": 0.14921,
    "h": 284.5
  },
  "luminance": 0.02656
}

Semantic roles & 50–950 ramp

primary
#2F1978
secondary
#94AD40
accent
#E83FC1
background
#F7F5FA
surface
#EDE9F3
border
#C8C5CD
text
#09040F
muted
#7B797F

Preview Lab

Preview with #2F1978

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

Preview Lab → · Contrast checker → · Palette generator →

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