CSS Four Corner Gradient Background
A four corner gradient in pure CSS: a see-through radial glow from each corner over a dark base. Pick all five colors and set the glow strength and size.
.bg-four-corner-gradient {
--bg: #222564;
--c1: #880088;
--c2: #cc3f47;
--c3: #167364;
--c4: #223b8c;
--opacity: 85%;
--spread: 60%;
background-color: var(--bg);
background-image:
radial-gradient(circle at 0 0, color-mix(in srgb, var(--c1) var(--opacity), transparent), transparent var(--spread)),
radial-gradient(circle at 100% 0, color-mix(in srgb, var(--c2) var(--opacity), transparent), transparent var(--spread)),
radial-gradient(circle at 0 100%, color-mix(in srgb, var(--c3) var(--opacity), transparent), transparent var(--spread)),
radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--c4) var(--opacity), transparent), transparent var(--spread));
}<div class="
[--bg:#222564]
[--c1:#880088]
[--c2:#cc3f47]
[--c3:#167364]
[--c4:#223b8c]
[--opacity:85%]
[--spread:60%]
[background-color:var(--bg)]
[background-image:radial-gradient(circle_at_0_0,_color-mix(in_srgb,_var(--c1)_var(--opacity),_transparent),_transparent_var(--spread)),_radial-gradient(circle_at_100%_0,_color-mix(in_srgb,_var(--c2)_var(--opacity),_transparent),_transparent_var(--spread)),_radial-gradient(circle_at_0_100%,_color-mix(in_srgb,_var(--c3)_var(--opacity),_transparent),_transparent_var(--spread)),_radial-gradient(circle_at_100%_100%,_color-mix(in_srgb,_var(--c4)_var(--opacity),_transparent),_transparent_var(--spread))]
"></div><!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Four Corner Gradient — CSS background</title>
<style>
html, body { height: 100%; margin: 0; }
.bg-four-corner-gradient {
--bg: #222564;
--c1: #880088;
--c2: #cc3f47;
--c3: #167364;
--c4: #223b8c;
--opacity: 85%;
--spread: 60%;
background-color: var(--bg);
background-image:
radial-gradient(circle at 0 0, color-mix(in srgb, var(--c1) var(--opacity), transparent), transparent var(--spread)),
radial-gradient(circle at 100% 0, color-mix(in srgb, var(--c2) var(--opacity), transparent), transparent var(--spread)),
radial-gradient(circle at 0 100%, color-mix(in srgb, var(--c3) var(--opacity), transparent), transparent var(--spread)),
radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--c4) var(--opacity), transparent), transparent var(--spread));
}
</style>
</head>
<body class="bg-four-corner-gradient"></body>
</html>Save the pattern as an image, with your current colors and settings.
How this four corner gradient works
This gradient stacks four semi-transparent radial-gradient() layers over a solid base, one anchored in each corner: at 0 0, at 100% 0, at 0 100% and at 100% 100%.
Each glow starts as a color-mix() of its color and transparent. --opacity sets how much of the color is kept, so at 85% the base shows through a little even in the corners. Each glow then fades to transparent by --spread. For a circle placed in a corner, 100% reaches the opposite corner, so 60% stops a bit past the middle.
Because the layers are see-through, the glows mix where they overlap, and the dark base deepens the middle. That gives the soft, lit-from-the-edges look of a mesh gradient with only four layers. Lower --spread for four distinct pools of color, or raise it to blend them into one wash.
Use it for hero sections, app login screens, card backgrounds and music or event pages.