Atmosphere✨ Premium

Northern Lights

Three CSS gradient layers animated by `auroraFlow` (wave + skew) and `auroraHue` (360° hue rotation) — pure CSS, zero JavaScript.

CSSGradientHue-rotate

You'll get access to the interactive demo with a free account.

This effect is part of Effect.Labs — 811 vanilla effects, some free, some premium. Atmosphere has 57 effects, including 10 free. Explore the category →

3 usage examples

Hero / Landing — Astronomy or Nordic travel homepage — Northern Lights example 1

① Hero / Landing — Astronomy or Nordic travel homepage

WhenProducts tied to astronomy, Scandinavian travel, meditation, or night/space themes — the aurora immediately sets the mood without any bitmap image.
WhyThe slow undulation of the background layers keeps hero text fully readable while anchoring the page in an Arctic or contemplative register — three CSS colors alone differentiate the page from competitors.
SettingsSlow auroraFlow to 12 s / 16 s / 9 s, blur to 20 px / 32 px / 18 px so H1 stays sharp, keep auroraHue at 12 s / 15 s / 10 s.
Editorial section — Full-width Arctic reportage banner — Northern Lights example 2

② Editorial section — Full-width Arctic reportage banner

WhenMultimedia article or feature on polar regions, Arctic science, or Nordic nature — the aurora dresses a full-width visual banner between two text blocks.
WhyAt editorial-banner scale, the three CSS layers unfold freely across the full width; hue rotation (auroraHue) plays at full amplitude and gives the spread a cinematic depth without any bitmap image.
SettingsRaise rgba to 0.12–0.18 for more presence, auroraFlow at 10 s / 12 s / 8 s, auroraHue at 14 s / 18 s / 11 s, blur 28 px / 38 px / 22 px for a more visible halo.
Conversion micro-interaction — Premium access confirmation screen — Northern Lights example 3

③ Conversion micro-interaction — Premium access confirmation screen

WhenAfter subscribing to a 'Night' plan or unlocking a premium feature — the aurora reinforces exclusivity and reward.
WhyA 100% CSS animation with no required interaction does not distract at the confirmation moment — it creates a premium atmosphere without demanding active attention and without slowing the page render.
SettingsLower rgba to 0.05–0.08 for a very subtle effect, extend auroraHue to 20 s / 25 s / 16 s for near-imperceptible hue rotation, background #0d0d20.

How it works

The effect uses three .aurora-layer elements in position: absolute, each set to width: 200%; left: -50% — the over-width allows ±10% translations without revealing the scene's edges. Each layer carries a vertical linear-gradient of green–blue–purple at very low rgba opacity (0.06–0.12), followed by a filter: blur() of 25–40 px that blends the gradient bands into a soft luminous halo.

Two @keyframes drive each layer simultaneously. auroraFlow combines translateX (−10% ↔ +5%), skewX (−5° ↔ +3°), and scaleY (0.8 ↔ 1.2) with ease-in-out easing: the layer slides laterally, shears, and "breathes" vertically. auroraHue applies hue-rotate(0deg → 360deg) on the same blur filter at linear timing, continuously spinning all hues — greens become cyan, then blue, then violet, then green again.

The three layers are not in sync: their durations differ (6 s / 8 s / 10 s for auroraFlow; 10 s / 12 s / 15 s for auroraHue) and the middle layer runs animation-direction: reverse for auroraFlow — it drifts the opposite way, creating phase interference that mimics the unpredictability of a real aurora. The third layer also reverses auroraHue, shifting its hue cycle independently.

The stars are six white dots drawn by radial-gradient(1px 1px at …) on a single .aurora-stars element at opacity: 0.6 — no extra DOM nodes, no canvas. The effect is 100% CSS with no requestAnimationFrame or JS: the browser delegates all animations to GPU compositing via transform and filter properties.

Accessibility

  • prefers-reduced-motion: absent from the code. No @media (prefers-reduced-motion: reduce) rule is present — animations run even when the OS signals a motion-reduction preference. Add manually: @media (prefers-reduced-motion: reduce) { .aurora-layer { animation: none } }.
  • The .aurora-container is purely decorative but does not carry aria-hidden="true" — add it in your integration if no descriptive text accompanies the scene.
  • The .aurora-label text is in the normal DOM flow and readable by screen readers; no role or aria-label is set on the scene itself.
  • Label contrast: rgba(255,255,255,0.8) on #0a0a1e background → ratio ≈ 12:1, well above the WCAG AA threshold (4.5:1). The green text-shadow does not degrade readability.
  • No focusable element is introduced by the effect — it is purely decorative and requires no keyboard interaction.

Browser compatibility

Requires CSS animations, filter: blur() and hue-rotate() — supported in all modern browsers since 2016.

Chrome 53+✓ Full
Firefox 35+✓ Full
Safari 9.1+✓ Full
Edge 79+✓ Full
Mobile iOS 9.3+✓ Full
Android Chrome 53+✓ Full

Without <code>filter</code> support (IE 11 and earlier), the layers render as sharp colored rectangles without blur — the dark atmosphere remains, the page stays functional.

The code

HTML structure to paste into your page (CSS + JS available with a premium account):

index.html — structure
<div class="demo-preview">
  <div class="aurora-container" aria-hidden="true">
    <div class="aurora-stars"></div>
    <div class="aurora-layer"></div><!-- layer 1: 8s auroraFlow / 12s auroraHue -->
    <div class="aurora-layer"></div><!-- layer 2: 10s reverse / 15s normal -->
    <div class="aurora-layer"></div><!-- layer 3: 6s normal / 10s reverse -->
  </div>
  <!-- Optional overlay content: text, CTA… -->
  <span class="aurora-label">Aurora Borealis</span>
</div>
🔒 Unlock the full code — from €2.99 the first month

Full HTML + CSS + JS, copy-paste ready — with hundreds of premium effects.

Customize

Options passed to the API or data-* attributes:

Option / propertyDefaultEffect
rgba in linear-gradient (layer colors) green rgba(0,255,128,.08–.10), cyan rgba(0,200,255,.12), violet rgba(100,0,255,.08–.10) Modify the rgba values in each .aurora-layer background — each layer can have independent hues. Pink-violet theme: replace green with rgba(255,0,128,0.10).
filter: blur() per layer 30 px / 40 px / 25 px Increase to 60 px for an ultra-diffuse halo; drop to 12 px for more visible gradient shapes. Edit in .aurora-layer (default), :nth-child(2), and :nth-child(3).
auroraFlow duration 8 s (layer 1) / 10 s (layer 2, reverse) / 6 s (layer 3) Staggered durations create the phase offset mimicking aurora unpredictability. Scale uniformly (×2 = contemplative, ×0.5 = agitated). Keep all three values different — syncing them removes the interference effect.
auroraHue duration 12 s (layer 1) / 15 s (layer 2) / 10 s (layer 3, reverse) Controls hue rotation speed. 30 s+ = near-imperceptible cycle; 5 s = fast, hypnotic color shift. Vary durations between layers for independent hue cycles.
.aurora-stars opacity 0.6 0 = clean sky with no stars; 1 = very visible stars. Also replace the at 10% 20%, 30% 70%… coordinates in the radial-gradients to customize the star field layout.
height of .aurora-layer 60% / 50% / 40% Increase for a thicker aurora curtain covering more of the scene; reduce to 20–30% for a thin horizon band.
.aurora-container background #0a0a1e Must stay dark for semi-transparent gradients to be visible. #050510 for deeper night blue; #0f0a05 for a dark desert-night ambiance.

FAQ

No — the effect is 100% CSS: no dependencies, no canvas, zero requestAnimationFrame. Animations are declarative and delegated to the browser's GPU compositor. Embeddable anywhere: static HTML, Angular, React, Vue, Svelte — just copy the CSS and the three .aurora-layer divs.
All colors live in the rgba() values of each .aurora-layer linear-gradient. Cyberpunk: swap green and violet for rgba(57,255,20,.10) and rgba(204,0,255,.10). Wintry/Arctic: keep blues, remove greens, add white-blue rgba(200,240,255,.08). No build tool needed.
Not in its current version — no @media (prefers-reduced-motion) rule is present. To add it: @media (prefers-reduced-motion: reduce) { .aurora-layer, .aurora-stars { animation: none } }. The effect will remain visible as a static blurred color background — no animations will run.