#40396C

Closest named color: Dark Slate Blue (#483D8B). oklch(37.7% 0.085 287.9), rgb(64, 57, 108).

Aa

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

About this color

#40396C is a dark, moderately saturated purple. In OKLCH its lightness is 38%, its chroma 0.085 and its hue 288°. Its hue sits on the cool side of the wheel. The nearest named color is Dark Slate Blue (#483D8B), ΔE 0.054 away. White text reads best on it, at 10.39:1.

Hue familyPurples
Lightnessdark (38%)
Chromamoderately saturated (0.085)
Temperaturecool
Nearest nameDark Slate Blue (#483D8B)
Black text2.01:1
White text10.39:1

Values

HEX#40396C
RGBrgb(64, 57, 108)
HSLhsl(248, 31%, 32%)
OKLCHoklch(37.7% 0.085 287.9)

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 #40396C 10.39:1 AAA Lc -98.0 Preferred for body text
Black text on #40396C 2.01:1 Fails Lc 9.9 Not readable
#40396C text on white 10.39:1 AAA Lc 94.0 Preferred for body text
#40396C text on black 2.01:1 Fails Lc -8.5 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

    #F5F5FB

    oklch(97.2% 0.008 286.3)

  2. Step 100

    100

    #E9E8F6

    oklch(93.6% 0.019 289.3)

  3. Step 200

    200

    #D7D6F0

    oklch(88.5% 0.036 287.4)

  4. Step 300

    300

    #BEBBE8

    oklch(81% 0.063 288)

  5. Step 400

    400

    #9D96DD

    oklch(70.6% 0.103 288)

  6. Step 500

    500

    #867BD4

    oklch(63.1% 0.131 287.7)

  7. Step 600

    600

    #7162C1

    oklch(55.6% 0.143 288.1)

  8. Step 700

    700

    #5F51A6

    oklch(49.1% 0.132 288.1)

  9. Step 800

    800

    #4D4387

    oklch(42.8% 0.109 287.6)

  10. Step 900

    900 (this color)

    #40396C

    oklch(37.7% 0.085 287.9)

  11. Step 950

    950

    #25223F

    oklch(27.1% 0.053 287)

Export this scale for Tailwind in the Tailwind colors tool

#40396C 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)#27416E0.040
Deuteranopia (no green cones)#273F6B0.039
Tritanopia (no blue cones)#34434D0.072
Achromatopsia (no color)#4040400.085

Harmonies

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

Complementary

The opposite hue (180°).

  • #40396C

    #40396C

    oklch(37.7% 0.085 287.9)

  • #464400

    #464400

    oklch(37.6% 0.081 107.8)

Open the complementary palette in the generator

Analogous

Neighbouring hues, 30° either side.

  • #40396C

    #40396C

    oklch(37.7% 0.085 287.9)

  • #23426E

    #23426E

    oklch(37.9% 0.084 257.4)

  • #54325F

    #54325F

    oklch(37.8% 0.085 317.5)

Open the analogous palette in the generator

Split complementary

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

  • #40396C

    #40396C

    oklch(37.7% 0.085 287.9)

  • #583B00

    #583B00

    oklch(37.6% 0.078 77.7)

  • #294C1C

    #294C1C

    oklch(37.8% 0.085 138.1)

Open the split complementary palette in the generator

Triadic

Three hues spaced 120° apart.

  • #40396C

    #40396C

    oklch(37.7% 0.085 287.9)

  • #653113

    #653113

    oklch(37.7% 0.086 47.8)

  • #004E3A

    #004E3A

    oklch(37.7% 0.076 168.5)

Open the triadic palette in the generator

Square

Four hues spaced 90° apart.

  • #40396C

    #40396C

    oklch(37.7% 0.085 287.9)

  • #672C30

    #672C30

    oklch(37.6% 0.085 17.9)

  • #464400

    #464400

    oklch(37.6% 0.081 107.8)

  • #004C4E

    #004C4E

    oklch(37.8% 0.064 197.8)

Open the square palette in the generator

Palettes with this color

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

Similar named colors

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

Use #40396C 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.