HSL(245, 41%, 31%)
Blue — Blue color
Adjust Color
Color Information
Color Name
Blue
Color Family
Blue
Warm / Cool
🔵 Cool
Temperature
9000K
CSS Class
bg-[hsl(245,41%,31%)]
Color Conversions
| Format | Value | CSS Usage | |
|---|---|---|---|
| HSL | hsl(245, 41%, 31%) | color: hsl(245, 41%, 31%) | |
| HEX | #342F6F | color: #342F6F | |
| RGB | rgb(52, 47, 111) | color: rgb(52, 47, 111) | |
| CMYK | cmyk(53%, 58%, 0%, 56%) | — | |
| HSV | hsv(245, 58%, 44%) | — | |
| HWB | hwb(245 18% 56%) | color: hwb(245 18% 56%) | |
| OKLCH | oklch(0.3481 0.1071 282.83) | color: oklch(0.3481 0.1071 282.83) | |
| Lab | lab(23.37 21.32 -36.57) | color: lab(23.37 21.32 -36.57) | |
| LCH | lch(23.37 42.33 300.24) | color: lch(23.37 42.33 300.24) |
Color Theory
Accessibility (WCAG)
White text on color
Black text on color
Colored text
Contrast Ratios
AA Normal (4.5:1)
AA Large (3:1)
AAA Normal (7:1)
Best text on this color: white
Color Blindness Simulation
Protanopia (Red-blind)
#323260 — rgb(50, 50, 96)
Deuteranopia (Green-blind)
#32335C — rgb(50, 51, 92)
Tritanopia (Blue-blind)
#345351 — rgb(52, 83, 81)
Tints & Shades
CSS Code Snippets
background
background-color: hsl(245, 41%, 31%);
text
color: hsl(245, 41%, 31%);
border
border: 2px solid hsl(245, 41%, 31%);
gradient light
background: linear-gradient(to right, hsl(245, 41%, 51%), hsl(245, 41%, 31%));
gradient dark
background: linear-gradient(to right, hsl(245, 41%, 31%), hsl(245, 41%, 11%))
hex
background-color: #342F6F;
tailwind
bg-[hsl(245,41%,31%)]
box shadow
box-shadow: 0 4px 6px -1px hsl(245, 41%, 31%, 0.4);
css variable
--color-primary: hsl(245, 41%, 31%);
Related Colors
Use Cases for Blue
Frequently Asked Questions
What are all the color codes for HSL(245, 41%, 31%)?
HEX: #342F6F | RGB: rgb(52, 47, 111) | CMYK: 53%, 58%, 0%, 56% | HSV: 245°, 58%, 44%. Copy any format from the conversion table above.
What colors go well with #342F6F?
The complementary color is HSL(65, 41%, 31%). For a triadic harmony, use hues 245°, 5°, and 125°. For analogous combinations, try hues 215° and 275°. See the Color Harmony section above for complete palettes with previews.
How do I use HSL(245, 41%, 31%) in CSS?
As HSL: color: hsl(245, 41%, 31%); — As HEX: color: #342F6F; — As RGB: color: rgb(52, 47, 111); — Tailwind CSS: bg-[hsl(245,41%,31%)] — CSS variable: --color-primary: hsl(245, 41%, 31%);