CssShift logo CssShift — CSS Gradient Studio

Gold to White Gradient — CSS, Hex and Angles

Metallic highlight fading into paper — good for badges that must not look flat. The pair is #F59E0B → #FFFFFF, 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.

0° · bottom to top
45°
135° · default
90° · left to right
radial
conic

Copy the CSS

CSS
.gradient {
  background: #F59E0B; /* fallback for old browsers */
  background: -webkit-linear-gradient(135deg, #F59E0B 0%, #FFFFFF 100%);
  background: -moz-linear-gradient(135deg, #F59E0B 0%, #FFFFFF 100%);
  background: linear-gradient(135deg, #F59E0B 0%, #FFFFFF 100%);
}
CSS-in-JS
const gradientStyle = {
  background: '#F59E0B', // fallback
  backgroundImage: 'linear-gradient(135deg, #F59E0B 0%, #FFFFFF 100%)',
};

The two endpoints

NameHexRGBHSLvs whitevs black
Gold#F59E0Brgb(245, 158, 11)hsl(38, 92%, 50%)2.15:19.78:1
White#FFFFFFrgb(255, 255, 255)hsl(0, 0%, 100%)1.00:121.00:1

The midpoint is #facf85 (rgb(250, 207, 133), saturation 92%). Close to the 46% the two ends average, so the transition stays saturated throughout.

What each angle does

AngleDirectionFunction value
0°bottom → toplinear-gradient(0deg, #F59E0B 0%, #FFFFFF 100%)
45°bottom-left → top-rightlinear-gradient(45deg, #F59E0B 0%, #FFFFFF 100%)
90°left → rightlinear-gradient(90deg, #F59E0B 0%, #FFFFFF 100%)
135°top-left → bottom-rightlinear-gradient(135deg, #F59E0B 0%, #FFFFFF 100%)
180°top → bottomlinear-gradient(180deg, #F59E0B 0%, #FFFFFF 100%)
225°top-right → bottom-leftlinear-gradient(225deg, #F59E0B 0%, #FFFFFF 100%)
270°right → leftlinear-gradient(270deg, #F59E0B 0%, #FFFFFF 100%)
315°bottom-right → top-leftlinear-gradient(315deg, #F59E0B 0%, #FFFFFF 100%)

The same pair as linear, radial and conic

TypeFunction value
linearlinear-gradient(135deg, #F59E0B 0%, #FFFFFF 100%)
radialradial-gradient(circle at 50% 50%, #F59E0B 0%, #FFFFFF 100%)
conicconic-gradient(from 0deg at 50% 50%, #F59E0B 0%, #FFFFFF 100%)

Frequently asked

What is the CSS for a gold to white gradient?
background: linear-gradient(135deg, #F59E0B 0%, #FFFFFF 100%); — #F59E0B at 0% and #FFFFFF 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 #F59E0B 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 #facf85 holding 92% saturation against 46% 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 gold end. Measured ratios: Gold is 2.15:1 on white and 9.78:1 on black; White is 1.00:1 on white and 21.00:1 on black.

Related gradients