CSS Hourglass Radial Gradient Background
A see-through conic hourglass over a radial glow, in pure CSS. One color fills the top and bottom and fades out to the sides. Set its width, spin and colors.
.bg-hourglass-radial-gradient {
--bg: #6f006f;
--c1: #b560b5;
--c2: #f0dff0;
--opacity: 70%;
--wedge: 90deg;
--spin: 0deg;
background-color: var(--bg);
background-image:
conic-gradient(from var(--spin), color-mix(in srgb, var(--c2) var(--opacity), transparent), transparent var(--wedge) calc(180deg - var(--wedge)), color-mix(in srgb, var(--c2) var(--opacity), transparent) 180deg, transparent calc(180deg + var(--wedge)) calc(360deg - var(--wedge)), color-mix(in srgb, var(--c2) var(--opacity), transparent)),
radial-gradient(circle, var(--c1), var(--bg) 70%);
}<div class="
[--bg:#6f006f]
[--c1:#b560b5]
[--c2:#f0dff0]
[--opacity:70%]
[--wedge:90deg]
[--spin:0deg]
[background-color:var(--bg)]
[background-image:conic-gradient(from_var(--spin),_color-mix(in_srgb,_var(--c2)_var(--opacity),_transparent),_transparent_var(--wedge)_calc(180deg_-_var(--wedge)),_color-mix(in_srgb,_var(--c2)_var(--opacity),_transparent)_180deg,_transparent_calc(180deg_+_var(--wedge))_calc(360deg_-_var(--wedge)),_color-mix(in_srgb,_var(--c2)_var(--opacity),_transparent)),_radial-gradient(circle,_var(--c1),_var(--bg)_70%)]
"></div><!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Hourglass Radial Gradient — CSS background</title>
<style>
html, body { height: 100%; margin: 0; }
.bg-hourglass-radial-gradient {
--bg: #6f006f;
--c1: #b560b5;
--c2: #f0dff0;
--opacity: 70%;
--wedge: 90deg;
--spin: 0deg;
background-color: var(--bg);
background-image:
conic-gradient(from var(--spin), color-mix(in srgb, var(--c2) var(--opacity), transparent), transparent var(--wedge) calc(180deg - var(--wedge)), color-mix(in srgb, var(--c2) var(--opacity), transparent) 180deg, transparent calc(180deg + var(--wedge)) calc(360deg - var(--wedge)), color-mix(in srgb, var(--c2) var(--opacity), transparent)),
radial-gradient(circle, var(--c1), var(--bg) 70%);
}
</style>
</head>
<body class="bg-hourglass-radial-gradient"></body>
</html>Save the pattern as an image, with your current colors and settings.
How this hourglass radial gradient works
Two layers make this one. The bottom is a radial-gradient() that glows from --c1 in the center out to --bg at the edges. On top sits a single-color conic-gradient() that is solid straight up and straight down, and fully transparent straight left and straight right, so it forms a soft hourglass.
The conic has five stops: the color at 0°, transparent at --wedge, the color again at 180°, transparent again at 180° plus --wedge, and the color back at 360°. At 90° the color fades smoothly all the way round. Lower --wedge and the transparent gaps widen, so the hourglass narrows to two pointed beams. The color is a color-mix() with transparent at --opacity, so the glow shows through it.
--spin turns the hourglass with from, so the beams can lean or lie flat. Use it for hero sections, spotlights behind a product, and event or music pages.