Orange to Yellow Gradient — CSS, Hex and Angles
Full daylight: high perceived brightness, so it works under dark text but not under white. The pair is #F97316 → #FACC15, 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: #F97316; /* fallback for old browsers */
background: -webkit-linear-gradient(135deg, #F97316 0%, #FACC15 100%);
background: -moz-linear-gradient(135deg, #F97316 0%, #FACC15 100%);
background: linear-gradient(135deg, #F97316 0%, #FACC15 100%);
}const gradientStyle = {
background: '#F97316', // fallback
backgroundImage: 'linear-gradient(135deg, #F97316 0%, #FACC15 100%)',
};The two endpoints
| Name | Hex | RGB | HSL | vs white | vs black | |
|---|---|---|---|---|---|---|
| Orange | #F97316 | rgb(249, 115, 22) | hsl(25, 95%, 53%) | 2.80:1 | 7.49:1 | |
| Yellow | #FACC15 | rgb(250, 204, 21) | hsl(48, 96%, 53%) | 1.53:1 | 13.71:1 |
The midpoint is #faa016 (rgb(250, 160, 22), saturation 95%). Close to the 95% the two ends average, so the transition stays saturated throughout.
What each angle does
| Angle | Direction | Function value |
|---|---|---|
| 0° | bottom → top | linear-gradient(0deg, #F97316 0%, #FACC15 100%) |
| 45° | bottom-left → top-right | linear-gradient(45deg, #F97316 0%, #FACC15 100%) |
| 90° | left → right | linear-gradient(90deg, #F97316 0%, #FACC15 100%) |
| 135° | top-left → bottom-right | linear-gradient(135deg, #F97316 0%, #FACC15 100%) |
| 180° | top → bottom | linear-gradient(180deg, #F97316 0%, #FACC15 100%) |
| 225° | top-right → bottom-left | linear-gradient(225deg, #F97316 0%, #FACC15 100%) |
| 270° | right → left | linear-gradient(270deg, #F97316 0%, #FACC15 100%) |
| 315° | bottom-right → top-left | linear-gradient(315deg, #F97316 0%, #FACC15 100%) |
The same pair as linear, radial and conic
| Type | Function value |
|---|---|
| linear | linear-gradient(135deg, #F97316 0%, #FACC15 100%) |
| radial | radial-gradient(circle at 50% 50%, #F97316 0%, #FACC15 100%) |
| conic | conic-gradient(from 0deg at 50% 50%, #F97316 0%, #FACC15 100%) |
Frequently asked
What is the CSS for a orange to yellow gradient?background: linear-gradient(135deg, #F97316 0%, #FACC15 100%); — #F97316 at 0% and #FACC15 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 #F97316 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 #faa016 holding 95% saturation against 95% at the ends.
Can I put text straight onto it?
Check both ends, not the average. White text clears 4.5:1 against neither end and black text clears it against the orange end. Measured ratios: Orange is 2.80:1 on white and 7.49:1 on black; Yellow is 1.53:1 on white and 13.71:1 on black.