Iridescent Pearl Sheen
A pearl, opal or oil-slick surface whose colours shift with the viewing angle slider and pointer.
AI prompt
Macro product photograph of a smooth pearl-white tile with a soft iridescent finish that shifts from pale pink to mint to lavender across the surface, a diffuse white sheen near the upper left, gentle falloff to a cooler edge, minimal grey backdrop, studio softbox lighting, shallow depth of field, calm and luxurious. Variants: opal with warmer fire flecks, dark oil-slick film with magenta, teal and gold rainbow bands. Negative: neon rainbow, cartoon gradient, glitter, text, fingerprints, harsh reflections. Reduced motion: single static angle.About this pattern
Definition
Iridescence is colour that changes with the angle you look from, as on pearls, soap bubbles and beetle shells. A gradient made of three hues a short distance apart, with the hue offset tied to angle, reproduces the effect.
When to use it
- Keep the colours pastel and close in lightness so the shift looks like light, not paint.
- Add a soft white sheen that follows the pointer to sell the curved surface.
- In prompts name the substance, not just the colours: pearl, opal, oil on water.
What the controls do
- Three surfaces (Pearl, Opal, Oil slick), an Angle slider and pointer movement.
Motion & timing
- Hue and the sheen position follow the input with no easing.
- Reduced motion: no transitions.
Tips & variations
- Use the Angle slider for touch; hover alone is not enough.
- Avoid placing small text directly on the sheen.
Code of this live preview
<div class="bx"><div class="pl" id="pl" tabindex="0" aria-label="Iridescent surface"></div><div class="pre" id="pre" role="group" aria-label="Surface"><button data-p="0" aria-pressed="true">Pearl</button><button data-p="1" aria-pressed="false">Opal</button><button data-p="2" aria-pressed="false">Oil slick</button></div><label class="rw">Angle <b id="av">60°</b><input id="an" type="range" min="0" max="360" value="60"></label></div>:root{--bg:#F1F1EF;--surface:#fff;--surface-2:#F7F7F5;--line:#E0E0DC;--text:#171717;--muted:#6f6f6f;--accent:#171717;--accent-ink:#fff;--danger:#d92d20}
*{box-sizing:border-box;margin:0}
.pre{display:flex;gap:5px;flex-wrap:wrap}.pre button{height:28px;padding:0 11px;border-radius:99px;border:1px solid var(--line);background:var(--surface);font-size:11px;cursor:pointer}
.pre button[aria-pressed=true]{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.bx{width:min(330px,100%);display:grid;gap:9px}.rw{display:grid;gap:3px;font-size:11.5px;color:var(--muted)}.rw b{color:var(--text);font-weight:600}input[type=range]{width:100%;accent-color:#171717}
.out{font-size:12px;color:var(--muted);line-height:1.4}.out b{color:var(--text)}
button:focus-visible,input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.pl{height:132px;border-radius:16px;box-shadow:0 8px 18px rgba(0,0,0,.14),inset 0 0 0 1px rgba(255,255,255,.5);background:radial-gradient(circle at var(--x,30%) var(--y,25%),rgba(255,255,255,.85),transparent 45%),linear-gradient(115deg,hsl(var(--h) var(--s) var(--l)),hsl(calc(var(--h) + 60) var(--s) var(--l)),hsl(calc(var(--h) + 140) var(--s) var(--l)))}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}const T=[[80,'72%','86%'],[20,'55%','84%'],[200,'62%','64%']],pl=document.getElementById('pl'),an=document.getElementById('an'),bs=[...document.querySelectorAll('#pre button')];let p=0;
function up(){pl.style.setProperty('--h',(+an.value+T[p][0])%360);pl.style.setProperty('--s',T[p][1]);pl.style.setProperty('--l',T[p][2]);pl.style.setProperty('--x',(an.value/360*100)+'%');document.getElementById('av').textContent=an.value+'°';bs.forEach(b=>b.setAttribute('aria-pressed',String(+b.dataset.p===p)));}
bs.forEach(b=>b.addEventListener('click',()=>{p=+b.dataset.p;up();}));an.addEventListener('input',up);
pl.addEventListener('pointermove',e=>{const r=pl.getBoundingClientRect();an.value=Math.round((e.clientX-r.left)/r.width*360);pl.style.setProperty('--y',((e.clientY-r.top)/r.height*100)+'%');up();});up();One complete HTML file. Save it and open it in a browser.
<!doctype html>
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Iridescent Pearl Sheen — demo</title>
<style>
:root{--bg:#F1F1EF;--surface:#fff;--surface-2:#F7F7F5;--line:#E0E0DC;--text:#171717;--muted:#6f6f6f;--accent:#171717;--accent-ink:#fff;--danger:#d92d20}
*{box-sizing:border-box;margin:0}
html,body{height:100%}body{background:var(--bg);color:var(--text);font:15px/1.5 -apple-system,BlinkMacSystemFont,'Segoe UI',Inter,Roboto,sans-serif;-webkit-font-smoothing:antialiased}.stage{min-height:100%;display:grid;place-items:center;padding:24px}button,input,select,textarea{font-family:inherit}@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
.pre{display:flex;gap:5px;flex-wrap:wrap}.pre button{height:28px;padding:0 11px;border-radius:99px;border:1px solid var(--line);background:var(--surface);font-size:11px;cursor:pointer}
.pre button[aria-pressed=true]{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.bx{width:min(330px,100%);display:grid;gap:9px}.rw{display:grid;gap:3px;font-size:11.5px;color:var(--muted)}.rw b{color:var(--text);font-weight:600}input[type=range]{width:100%;accent-color:#171717}
.out{font-size:12px;color:var(--muted);line-height:1.4}.out b{color:var(--text)}
button:focus-visible,input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.pl{height:132px;border-radius:16px;box-shadow:0 8px 18px rgba(0,0,0,.14),inset 0 0 0 1px rgba(255,255,255,.5);background:radial-gradient(circle at var(--x,30%) var(--y,25%),rgba(255,255,255,.85),transparent 45%),linear-gradient(115deg,hsl(var(--h) var(--s) var(--l)),hsl(calc(var(--h) + 60) var(--s) var(--l)),hsl(calc(var(--h) + 140) var(--s) var(--l)))}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
</style></head>
<body><div class="stage">
<div class="bx"><div class="pl" id="pl" tabindex="0" aria-label="Iridescent surface"></div><div class="pre" id="pre" role="group" aria-label="Surface"><button data-p="0" aria-pressed="true">Pearl</button><button data-p="1" aria-pressed="false">Opal</button><button data-p="2" aria-pressed="false">Oil slick</button></div><label class="rw">Angle <b id="av">60°</b><input id="an" type="range" min="0" max="360" value="60"></label></div>
</div>
<script>
const T=[[80,'72%','86%'],[20,'55%','84%'],[200,'62%','64%']],pl=document.getElementById('pl'),an=document.getElementById('an'),bs=[...document.querySelectorAll('#pre button')];let p=0;
function up(){pl.style.setProperty('--h',(+an.value+T[p][0])%360);pl.style.setProperty('--s',T[p][1]);pl.style.setProperty('--l',T[p][2]);pl.style.setProperty('--x',(an.value/360*100)+'%');document.getElementById('av').textContent=an.value+'°';bs.forEach(b=>b.setAttribute('aria-pressed',String(+b.dataset.p===p)));}
bs.forEach(b=>b.addEventListener('click',()=>{p=+b.dataset.p;up();}));an.addEventListener('input',up);
pl.addEventListener('pointermove',e=>{const r=pl.getBoundingClientRect();an.value=Math.round((e.clientX-r.left)/r.width*360);pl.style.setProperty('--y',((e.clientY-r.top)/r.height*100)+'%');up();});up();
</script>
</body></html>