#271D5C

Closest named color: Midnight Blue (#191970). oklch(28.5% 0.108 284.5), rgb(39, 29, 92).

Aa

White text reads best on this color (14.82:1).

About this color

#271D5C is a dark, moderately saturated purple. In OKLCH its lightness is 29%, its chroma 0.108 and its hue 285°. Its hue sits on the cool side of the wheel. The nearest named color is Midnight Blue (#191970), ΔE 0.044 away. White text reads best on it, at 14.82:1.

Hue familyPurples
Lightnessdark (29%)
Chromamoderately saturated (0.108)
Temperaturecool
Nearest nameMidnight Blue (#191970)
Black text1.41:1
White text14.82:1

Values

HEX#271D5C
RGBrgb(39, 29, 92)
HSLhsl(250, 52%, 24%)
OKLCHoklch(28.5% 0.108 284.5)

Contrast

WCAG 2 contrast ratios are the conformance target: AA needs 4.5:1 for body text and 3:1 for large text, AAA needs 7:1. APCA Lc values are supplementary guidance from the WCAG 3 drafts.

PairWCAG 2ResultAPCAAPCA guidance
White text on #271D5C 14.82:1 AAA Lc -104.2 Preferred for body text
Black text on #271D5C 1.41:1 Fails Lc 0.0 Not readable
#271D5C text on white 14.82:1 AAA Lc 101.4 Preferred for body text
#271D5C text on black 1.41:1 Fails Lc 0.0 Not readable

Tints and shades

A 50–950 scale built in OKLCH: the hue is held, lightness follows a Tailwind v4-like curve, and every step is kept inside the sRGB gamut. This color sits at step 950.

  1. Step 50

    50

    #F4F4FF

    oklch(97% 0.015 286.1)

  2. Step 100

    100

    #E7E7FF

    oklch(93.5% 0.032 285.8)

  3. Step 200

    200

    #D4D5FF

    oklch(88.6% 0.058 284.1)

  4. Step 300

    300

    #B9B8FF

    oklch(80.9% 0.1 284.6)

  5. Step 400

    400

    #9790FF

    oklch(70.8% 0.159 284.4)

  6. Step 500

    500

    #816EFF

    oklch(63.1% 0.207 284.7)

  7. Step 600

    600

    #6E45FF

    oklch(55.7% 0.256 284.5)

  8. Step 700

    700

    #5E24EB

    oklch(49.1% 0.263 284.4)

  9. Step 800

    800

    #4C23BE

    oklch(42.7% 0.218 284.4)

  10. Step 900

    900

    #3E2696

    oklch(37.7% 0.171 284.5)

  11. Step 950

    950 (this color)

    #271D5C

    oklch(28.5% 0.108 284.5)

Export this scale for Tailwind in the Tailwind colors tool

#271D5C with color blindness

Simulated with the Machado et al. (2009) model. ΔE is how far the color moves: below about 0.02 you would not notice a change.

VisionSeen asShift (ΔE)
Protanopia (no red cones)#00295E0.051
Deuteranopia (no green cones)#00265B0.049
Tritanopia (no blue cones)#112C390.089
Achromatopsia (no color)#2828280.108

Harmonies

Hue rotations in OKLCH that keep this color's lightness and chroma.

Complementary

The opposite hue (180°).

  • #271D5C

    #271D5C

    oklch(28.5% 0.108 284.5)

  • #2F2B00

    #2F2B00

    oklch(28.4% 0.06 104.1)

Open the complementary palette in the generator

Analogous

Neighbouring hues, 30° either side.

  • #271D5C

    #271D5C

    oklch(28.5% 0.108 284.5)

  • #002956

    #002956

    oklch(28.4% 0.092 254.6)

  • #3D134E

    #3D134E

    oklch(28.5% 0.108 314.5)

Open the analogous palette in the generator

Split complementary

The two hues beside the complement (150° and 210°).

  • #271D5C

    #271D5C

    oklch(28.5% 0.108 284.5)

  • #3B2500

    #3B2500

    oklch(28.5% 0.06 75.3)

  • #173200

    #173200

    oklch(28.4% 0.082 134.2)

Open the split complementary palette in the generator

Triadic

Three hues spaced 120° apart.

  • #271D5C

    #271D5C

    oklch(28.5% 0.108 284.5)

  • #4A1900

    #4A1900

    oklch(28.6% 0.083 44.5)

  • #003322

    #003322

    oklch(28.4% 0.06 164.5)

Open the triadic palette in the generator

Square

Four hues spaced 90° apart.

  • #271D5C

    #271D5C

    oklch(28.5% 0.108 284.5)

  • #530519

    #530519

    oklch(28.6% 0.108 14.4)

  • #2F2B00

    #2F2B00

    oklch(28.4% 0.06 104.1)

  • #003131

    #003131

    oklch(28.4% 0.048 194.8)

Open the square palette in the generator

Palettes with this color

Curated palettes that contain a color within ΔE 0.04 (OKLab) of #271D5C, closest first.

Similar named colors

The eight closest entries in our named color list, with their ΔE distance.

Use #271D5C in your product

Turn it into light and dark UI roles checked for contrast, then export to Tailwind v4, shadcn/ui, CSS or design tokens.