HSL(215, 40%, 31%)

Blue — Blue color

Adjust Color

Color Information

Color Name

Blue

Color Family

Blue

Warm / Cool

🔵 Cool

Temperature

9000K

CSS Class

bg-[hsl(215,40%,31%)]

Color Conversions

Format Value CSS Usage
HSL hsl(215, 40%, 31%) color: hsl(215, 40%, 31%)
HEX #2F4A6F color: #2F4A6F
RGB rgb(47, 74, 111) color: rgb(47, 74, 111)
CMYK cmyk(58%, 33%, 0%, 56%)
HSV hsv(215, 58%, 44%)
HWB hwb(215 18% 56%) color: hwb(215 18% 56%)
OKLCH oklch(0.4054 0.0709 256.53) color: oklch(0.4054 0.0709 256.53)
Lab lab(30.99 1.8 -24.47) color: lab(30.99 1.8 -24.47)
LCH lch(30.99 24.54 274.21) color: lch(30.99 24.54 274.21)

Color Theory

Complementary

Triadic

Analogous

Tetradic (Square)

Split-Complementary

Accessibility (WCAG)

White text on color

Black text on color

Color on white bg

Colored text

Contrast Ratios

vs White 9.01:1
vs Black 2.33:1

AA Normal (4.5:1)

on White: PASS ✓ on Black: FAIL ✗

AA Large (3:1)

on White: PASS ✓ on Black: FAIL ✗

AAA Normal (7:1)

on White: PASS ✓

Best text on this color: white

Color Blindness Simulation

Protanopia (Red-blind)

#3B3B66 — rgb(59, 59, 102)

Deuteranopia (Green-blind)

#393764 — rgb(57, 55, 100)

Tritanopia (Blue-blind)

#305F5D — rgb(48, 95, 93)

Tints & Shades

Tints (Lighter →)

← Shades (Darker)

Saturation (0% → 100%)

CSS Code Snippets

background

background-color: hsl(215, 40%, 31%);

text

color: hsl(215, 40%, 31%);

border

border: 2px solid hsl(215, 40%, 31%);

gradient light

background: linear-gradient(to right, hsl(215, 40%, 51%), hsl(215, 40%, 31%));

gradient dark

background: linear-gradient(to right, hsl(215, 40%, 31%), hsl(215, 40%, 11%))

hex

background-color: #2F4A6F;

tailwind

bg-[hsl(215,40%,31%)]

box shadow

box-shadow: 0 4px 6px -1px hsl(215, 40%, 31%, 0.4);

css variable

--color-primary: hsl(215, 40%, 31%);

Related Colors

Use Cases for Blue

Corporate branding Trust signals Tech products Social media Primary buttons

Frequently Asked Questions

What are all the color codes for HSL(215, 40%, 31%)?

HEX: #2F4A6F | RGB: rgb(47, 74, 111) | CMYK: 58%, 33%, 0%, 56% | HSV: 215°, 58%, 44%. Copy any format from the conversion table above.

What colors go well with #2F4A6F?

The complementary color is HSL(35, 40%, 31%). For a triadic harmony, use hues 215°, 335°, and 95°. For analogous combinations, try hues 185° and 245°. See the Color Harmony section above for complete palettes with previews.

How do I use HSL(215, 40%, 31%) in CSS?

As HSL: color: hsl(215, 40%, 31%); — As HEX: color: #2F4A6F; — As RGB: color: rgb(47, 74, 111); — Tailwind CSS: bg-[hsl(215,40%,31%)] — CSS variable: --color-primary: hsl(215, 40%, 31%);