CSS Radial Gradient Background

A radial gradient background in pure CSS: a warm glow from yellow through orange to red. Move the center, set the size and pick each color, then copy it.

#f09f33
#de6f3d
#cc3f47
50%
40%
75%
.bg-radial-gradient {
  --bg: #cc3f47;
  --c1: #f09f33;
  --c2: #de6f3d;
  --x: 50%;
  --y: 40%;
  --size: 75%;
  background-color: var(--bg);
  background-image: radial-gradient(circle at var(--x) var(--y), var(--c1) 0, var(--c2) calc(var(--size) / 2), var(--bg) var(--size));
}
<div class="
  [--bg:#cc3f47]
  [--c1:#f09f33]
  [--c2:#de6f3d]
  [--x:50%]
  [--y:40%]
  [--size:75%]
  [background-color:var(--bg)]
  [background-image:radial-gradient(circle_at_var(--x)_var(--y),_var(--c1)_0,_var(--c2)_calc(var(--size)_/_2),_var(--bg)_var(--size))]
"></div>
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Radial Gradient — CSS background</title>
  <style>
    html, body { height: 100%; margin: 0; }
    .bg-radial-gradient {
      --bg: #cc3f47;
      --c1: #f09f33;
      --c2: #de6f3d;
      --x: 50%;
      --y: 40%;
      --size: 75%;
      background-color: var(--bg);
      background-image: radial-gradient(circle at var(--x) var(--y), var(--c1) 0, var(--c2) calc(var(--size) / 2), var(--bg) var(--size));
    }
  </style>
</head>
<body class="bg-radial-gradient"></body>
</html>

Save the pattern as an image, with your current colors and settings.

How this radial gradient works

A radial-gradient() spreads color outward from a single point. This one uses three color stops: --c1 at the center, --c2 halfway out, and the edge color --bg at --size. Past that point the gradient keeps the edge color, which matches background-color, so there is no visible seam.

circle at var(--x) var(--y) places the center. Leave it at 50% 40% for a centered glow just above the middle, or move it to a corner for a sunrise effect. --size controls how far the glow reaches. Small values make a tight spotlight, large values a gentle wash across the whole element.

The default runs through neighboring warm colors (yellow, orange, red), so every step of the blend stays bright. Mixing colors from opposite sides of the color wheel makes the middle turn gray.

Radial gradients work well behind headings and product shots, on call-to-action sections, and as a soft vignette. The Tailwind tab gives the same gradient as arbitrary-property classes for Tailwind v4.

All CSS background gradients →