#402160

Closest named color: Royal Purple (#4B006E). oklch(32.4% 0.109 303.5), rgb(64, 33, 96).

Aa

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

About this color

#402160 is a dark, moderately saturated purple. In OKLCH its lightness is 32%, its chroma 0.109 and its hue 304°. Its hue sits between the warm and cool halves of the wheel. The nearest named color is Royal Purple (#4B006E), ΔE 0.055 away. White text reads best on it, at 13.08:1.

Hue familyPurples
Lightnessdark (32%)
Chromamoderately saturated (0.109)
Temperaturein between
Nearest nameRoyal Purple (#4B006E)
Black text1.60:1
White text13.08:1

Values

HEX#402160
RGBrgb(64, 33, 96)
HSLhsl(270, 49%, 25%)
OKLCHoklch(32.4% 0.109 303.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 #402160 13.08:1 AAA Lc -102.3 Preferred for body text
Black text on #402160 1.60:1 Fails Lc 0.0 Not readable
#402160 text on white 13.08:1 AAA Lc 99.0 Preferred for body text
#402160 text on black 1.60: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 900.

  1. Step 50

    50

    #F7F4FC

    oklch(97.2% 0.011 303.1)

  2. Step 100

    100

    #EDE6F7

    oklch(93.5% 0.024 304.5)

  3. Step 200

    200

    #DFD2F2

    oklch(88.4% 0.046 303.9)

  4. Step 300

    300

    #CBB4EC

    oklch(80.8% 0.081 303.4)

  5. Step 400

    400

    #B28BE3

    oklch(70.7% 0.131 303.6)

  6. Step 500

    500

    #9F6BDA

    oklch(63% 0.167 303.6)

  7. Step 600

    600

    #8B50C8

    oklch(55.6% 0.182 303.7)

  8. Step 700

    700

    #7640AD

    oklch(49.2% 0.169 303.6)

  9. Step 800

    800

    #60368C

    oklch(42.8% 0.139 303.6)

  10. Step 900

    900 (this color)

    #402160

    oklch(32.4% 0.109 303.5)

  11. Step 950

    950

    #2E1D41

    oklch(27.1% 0.067 304.1)

Export this scale for Tailwind in the Tailwind colors tool

#402160 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)#0030620.088
Deuteranopia (no green cones)#10315F0.080
Tritanopia (no blue cones)#3A2E3D0.079
Achromatopsia (no color)#3131310.109

Harmonies

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

Complementary

The opposite hue (180°).

  • #402160

    #402160

    oklch(32.4% 0.109 303.5)

  • #2C3A00

    #2C3A00

    oklch(32.4% 0.08 123.4)

Open the complementary palette in the generator

Analogous

Neighbouring hues, 30° either side.

  • #402160

    #402160

    oklch(32.4% 0.109 303.5)

  • #242B6A

    #242B6A

    oklch(32.3% 0.109 273.8)

  • #52184A

    #52184A

    oklch(32.3% 0.108 333.7)

Open the analogous palette in the generator

Split complementary

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

  • #402160

    #402160

    oklch(32.4% 0.109 303.5)

  • #3F3300

    #3F3300

    oklch(32.5% 0.067 94.5)

  • #003F1F

    #003F1F

    oklch(32.3% 0.082 153.9)

Open the split complementary palette in the generator

Triadic

Three hues spaced 120° apart.

  • #402160

    #402160

    oklch(32.4% 0.109 303.5)

  • #4D2A00

    #4D2A00

    oklch(32.3% 0.073 63.8)

  • #003D37

    #003D37

    oklch(32.3% 0.057 184.1)

Open the triadic palette in the generator

Square

Four hues spaced 90° apart.

  • #402160

    #402160

    oklch(32.4% 0.109 303.5)

  • #5F1606

    #5F1606

    oklch(32.4% 0.108 33.8)

  • #2C3A00

    #2C3A00

    oklch(32.4% 0.08 123.4)

  • #003B45

    #003B45

    oklch(32.4% 0.057 213.1)

Open the square palette in the generator

Palettes with this color

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

Similar named colors

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

Use #402160 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.