Component · Animated backgrounds

Iridescent soap film background

by Informeek Studio 11 November 2026
Live Stir the film with the cursor, tap to send a ripple

The prompt

Create an iridescent background for a handmade soap brand, written as one WebGL fragment shader at half resolution that paints a draining soap film with real thin film interference. Work out a film thickness in nanometres per pixel, zero at the top rising to about 1,150nm at the bottom, bent by two layers of drifting domain warped noise so the bands curl. For the colour, sample three wavelengths per channel (615 to 690nm for red, 515 to 575nm for green, 435 to 490nm for blue) and use sin squared of 2 pi times 1.33 times thickness over wavelength for each, averaged. That gives a black film at the top, then silver, gold, magenta, blue and green bands. Desaturate slightly and add a soft highlight over near black (#060608). The pointer stirs the film with a swirl that grows with pointer speed, and a click or tap sends a ring of thickness rippling out. After 2.5s idle the swirl wanders slowly. Keep the black film behind the copy. Copy: a label with a tiny rainbow ring "Brimble and Lye soap kitchen", an 80px serif headline "Bars cured for six weeks, so they last for months" with "months" in a gold to magenta to teal gradient italic and a cream "Shop the bars" pill. Fall back to CSS bands without WebGL and draw one still frame for reduced motion.

Written by Informeek Studio to recreate this design. Prompts are not deterministic, so running it again gives a similar result, not an identical one.

Use it in three steps

  1. Copy the prompt with the button above.
  2. Paste it into your AI site builder, or any AI chat that writes code.
  3. Make it yours by moving the black film to sit behind your own headline.

About this iridescent background

This iridescent background is modelled on a soap film catching the light, the real thing rather than a pastel holographic gradient. The colours on a bubble come from light bouncing off the front and back of a film thinner than a wavelength, and which colours survive depends on that thickness. So the shader works out a thickness for every pixel and calculates the colour from it, the same way physics does.

Like a real film held upright, it is thinnest at the top, where it turns black, and thicker lower down, where silver gives way to gold, magenta, blue and green bands that slowly turn pastel. Noise drifts the thickness so the bands curl and climb. Your cursor stirs the film into a swirl that grows with how fast you move, and a tap sends a ripple out. The black band at the top is where the headline sits.

Why the prompt works

  • It gives the formula, sin squared of the optical path over wavelength.
  • It samples three wavelengths per channel, which keeps the colours smooth.
  • It uses the black film as a natural dark area for the copy.
  • It makes the swirl respond to speed, so stirring feels physical.

Where to use it

Soap and skincare brands, perfume launches, design studios, music artwork and any hero that wants colour with depth.

The prompt is shared under CC BY 4.0. Reuse it freely, including commercially, with a credit linking back to this page.

Keep exploring

More prompts like this

See the collection →
Live
Component · Animated backgrounds

Pixel background in thermal colours

Live
Component · Animated backgrounds

Animated gradient background in temper colours

Live
Component · Animated backgrounds

Guilloche pattern background