#1F1237

A color in the Violet family

#1f1237 is a color in the Violet family: RGB(31, 18, 55), HSL(261°, 51%, 14%), CMYK(44%, 67%, 0%, 78%). Closest named color: midnightblue. Contrast is 17.5:1 on white and 1.2:1 on black. See shades, harmonies and color-blindness simulation.

Open in Picker Generate Scheme

Color Codes

HEX#1f1237
RGBrgb(31 18 55)
RGB (legacy)rgb(31, 18, 55)
RGB %rgb(12% 7% 22%)
HSLhsl(261 51% 14%)
HSV / HSBhsv(261, 67%, 22%)
HWBhwb(261 7% 78%)
CMYKcmyk(44%, 67%, 0%, 78%)
CIELAB (D50)lab(8.74 14.67 -22.14)
LCHlch(8.74 26.56 303.53)
OKLaboklab(0.2225 0.031 -0.0621)
OKLCHoklch(0.2225 0.0694 296.55)
Decimal2036279

Properties

Color ToneViolet
Closest named colormidnightblue ΔE 10.7
Closest web-safe color#330033
Hue261°
Saturation (HSL / HSV)51% / 67%
Lightness (HSL)14%
Brightness or Value (HSV)22%
Luminance (Rec.601 / Rec.709)10% / 9%
Relative luminance (WCAG)0.01
Red / Green / Blue31 / 18 / 55

WCAG 2.2 Contrast Ratio

On White (#ffffff)
17.50:1
AA Normal (4.5:1) · PassAA Large (3:1) · PassAAA Normal (7:1) · Pass
On Black (#000000)
1.20:1
AA Normal (4.5:1) · FailAA Large (3:1) · FailAAA Normal (7:1) · Fail
Aa Bb 123

APCA Contrast Lc (reference) — As text on white / black: Lc 104.2 / 0 · As background with white / black text: Lc -106.5 / 0

Lightness Scale (OKLCH 50–950)

Eleven steps that change only perceived lightness while keeping hue and chroma — ready to use as design-system color tokens.

Tints (mixed with white)

Shades (mixed with black)

Color Harmonies

Color Vision Deficiency Simulation

Estimated appearance of this color for people with color vision deficiencies (Machado 2009).

Similar Named Colors

Use in CSS

:root {
  --color-brand: #1f1237;
  --color-brand-oklch: oklch(22.25% 0.0694 296.55);
}
.text { color: var(--color-brand); }
.background { background-color: var(--color-brand); }
.border { border: 1px solid rgb(31 18 55 / 50%); }
/* Tailwind CSS */
<div class="bg-[#1f1237] text-[#1f1237] border-[#1f1237]">