Navy to Teal Gradient — CSS, Hex and Angles
Deep and aquatic: a serious background that still feels alive under a glass panel. The pair is #1E3A8A → #14B8A6, and on a 135° axis it reads as a diagonal wash. Everything below is generated from those two values, so the CSS you copy is exactly what the previews render.
Copy the CSS
.gradient {
background: #1E3A8A; /* fallback for old browsers */
background: -webkit-linear-gradient(135deg, #1E3A8A 0%, #14B8A6 100%);
background: -moz-linear-gradient(135deg, #1E3A8A 0%, #14B8A6 100%);
background: linear-gradient(135deg, #1E3A8A 0%, #14B8A6 100%);
}const gradientStyle = {
background: '#1E3A8A', // fallback
backgroundImage: 'linear-gradient(135deg, #1E3A8A 0%, #14B8A6 100%)',
};The two endpoints
| Name | Hex | RGB | HSL | vs white | vs black | |
|---|---|---|---|---|---|---|
| Navy | #1E3A8A | rgb(30, 58, 138) | hsl(224, 64%, 33%) | 10.36:1 | 2.03:1 | |
| Teal | #14B8A6 | rgb(20, 184, 166) | hsl(173, 80%, 40%) | 2.49:1 | 8.44:1 |
The midpoint is #197998 (rgb(25, 121, 152), saturation 72%). Close to the 72% the two ends average, so the transition stays saturated throughout.
What each angle does
| Angle | Direction | Function value |
|---|---|---|
| 0° | bottom → top | linear-gradient(0deg, #1E3A8A 0%, #14B8A6 100%) |
| 45° | bottom-left → top-right | linear-gradient(45deg, #1E3A8A 0%, #14B8A6 100%) |
| 90° | left → right | linear-gradient(90deg, #1E3A8A 0%, #14B8A6 100%) |
| 135° | top-left → bottom-right | linear-gradient(135deg, #1E3A8A 0%, #14B8A6 100%) |
| 180° | top → bottom | linear-gradient(180deg, #1E3A8A 0%, #14B8A6 100%) |
| 225° | top-right → bottom-left | linear-gradient(225deg, #1E3A8A 0%, #14B8A6 100%) |
| 270° | right → left | linear-gradient(270deg, #1E3A8A 0%, #14B8A6 100%) |
| 315° | bottom-right → top-left | linear-gradient(315deg, #1E3A8A 0%, #14B8A6 100%) |
The same pair as linear, radial and conic
| Type | Function value |
|---|---|
| linear | linear-gradient(135deg, #1E3A8A 0%, #14B8A6 100%) |
| radial | radial-gradient(circle at 50% 50%, #1E3A8A 0%, #14B8A6 100%) |
| conic | conic-gradient(from 0deg at 50% 50%, #1E3A8A 0%, #14B8A6 100%) |
Frequently asked
What is the CSS for a navy to teal gradient?background: linear-gradient(135deg, #1E3A8A 0%, #14B8A6 100%); — #1E3A8A at 0% and #14B8A6 at 100%, on a 135° axis. Swap 135deg for to right if you want the direction to follow the element ratio instead of a fixed angle.
Does it need vendor prefixes?
Not for current browsers. Unprefixed linear-gradient has been supported everywhere for years, and the -webkit- / -moz- lines only matter for stacks that still ship to browsers older than 2013. The generator emits both, plus a solid #1E3A8A fallback.
Why would the middle look muddy?
This pair does not: both ends are close enough in hue that a straight sRGB blend stays clean, with mid #197998 holding 72% saturation against 72% at the ends.
Can I put text straight onto it?
Check both ends, not the average. White text clears 4.5:1 against the navy end and black text clears it against neither end. Measured ratios: Navy is 10.36:1 on white and 2.03:1 on black; Teal is 2.49:1 on white and 8.44:1 on black.