HSL(235, 70%, 40%)
Blue — Blue color
Adjust Color
Color Information
Color Name
Blue
Color Family
Blue
Warm / Cool
🔵 Cool
Temperature
9000K
CSS Class
bg-[hsl(235,70%,40%)]
Color Conversions
| Format | Value | CSS Usage | |
|---|---|---|---|
| HSL | hsl(235, 70%, 40%) | color: hsl(235, 70%, 40%) | |
| HEX | #1F2BAD | color: #1F2BAD | |
| RGB | rgb(31, 43, 173) | color: rgb(31, 43, 173) | |
| CMYK | cmyk(82%, 75%, 0%, 32%) | — | |
| HSV | hsv(235, 82%, 68%) | — | |
| HWB | hwb(235 12% 32%) | color: hwb(235 12% 32%) | |
| OKLCH | oklch(0.3872 0.2012 268.9) | color: oklch(0.3872 0.2012 268.9) | |
| Lab | lab(26.83 43 -69.42) | color: lab(26.83 43 -69.42) | |
| LCH | lch(26.83 81.66 301.77) | color: lch(26.83 81.66 301.77) |
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)
#24248E — rgb(36, 36, 142)
Deuteranopia (Green-blind)
#242386 — rgb(36, 35, 134)
Tritanopia (Blue-blind)
#20756F — rgb(32, 117, 111)
Tints & Shades
CSS Code Snippets
background
background-color: hsl(235, 70%, 40%);
text
color: hsl(235, 70%, 40%);
border
border: 2px solid hsl(235, 70%, 40%);
gradient light
background: linear-gradient(to right, hsl(235, 70%, 60%), hsl(235, 70%, 40%));
gradient dark
background: linear-gradient(to right, hsl(235, 70%, 40%), hsl(235, 70%, 20%))
hex
background-color: #1F2BAD;
tailwind
bg-[hsl(235,70%,40%)]
box shadow
box-shadow: 0 4px 6px -1px hsl(235, 70%, 40%, 0.4);
css variable
--color-primary: hsl(235, 70%, 40%);
Related Colors
Use Cases for Blue
Frequently Asked Questions
What are all the color codes for HSL(235, 70%, 40%)?
HEX: #1F2BAD | RGB: rgb(31, 43, 173) | CMYK: 82%, 75%, 0%, 32% | HSV: 235°, 82%, 68%. Copy any format from the conversion table above.
What colors go well with #1F2BAD?
The complementary color is HSL(55, 70%, 40%). For a triadic harmony, use hues 235°, 355°, and 115°. For analogous combinations, try hues 205° and 265°. See the Color Harmony section above for complete palettes with previews.
How do I use HSL(235, 70%, 40%) in CSS?
As HSL: color: hsl(235, 70%, 40%); — As HEX: color: #1F2BAD; — As RGB: color: rgb(31, 43, 173); — Tailwind CSS: bg-[hsl(235,70%,40%)] — CSS variable: --color-primary: hsl(235, 70%, 40%);