Change One Variable at a Time
Change light, lens or palette on one scene and see which highlighted prompt word caused the change.
AI prompt
Product photograph of a ceramic coffee cup on a wooden table, soft window light from the left, 85mm lens with shallow depth of field, warm cream and brown colour palette, steam rising, calm morning atmosphere. Change only one thing in each version: first the light to hard direct sun, then the lens to a wide 24mm, then the palette to cool blue and grey, keeping subject, framing and everything else identical so each effect can be seen. Negative: text, logos, extra objects, clutter, watermark. Reduced motion: static grid.About this pattern
Definition
Good prompt work is iterative: change one thing, look, then change the next. When several words change at once you cannot tell which one caused the result. Keeping everything else fixed turns prompting into a small experiment you can learn from.
When to use it
- Start from a base prompt that is close but not perfect.
- Change one variable per round: light, lens, palette, setting or style.
- Note what each change did, and keep winners.
- Keep the seed or settings fixed if the tool allows it.
What the controls do
- Three variable groups; the last changed word is highlighted in the prompt.
Motion & timing
- The scene changes instantly.
- Reduced motion: nothing animates.
Tips & variations
- Keep a log of versions so you can go back.
- Vary the most important variable first, usually subject and light.
Code of this live preview
<div class="bx"><div class="sc" id="sc"><i class="bg"></i><i class="cu"></i><i class="sh"></i></div><div class="gp" id="gp"></div><p class="pr" id="pr"></p><p class="out" id="out"></p></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}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}a{color:inherit;text-decoration:none}ul,ol,p,h4{margin:0;padding:0}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.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}
.sc{height:104px;border-radius:12px;position:relative;overflow:hidden;background:var(--bgc)}.sc i{position:absolute;display:block}.bg{inset:0;background:radial-gradient(circle at 20% 30%,rgba(255,255,255,var(--hl)),transparent 55%);filter:blur(var(--bb))}.cu{left:50%;bottom:16px;width:calc(40px*var(--sz));height:calc(34px*var(--sz));margin-left:calc(-20px*var(--sz));border-radius:4px 4px 18px 18px;background:var(--cc)}.sh{left:50%;bottom:10px;height:8px;width:calc(40px*var(--sz) + var(--sw)*1px);margin-left:calc(-20px*var(--sz));border-radius:50%;background:rgba(0,0,0,var(--so));filter:blur(var(--sb))}
.g{display:flex;gap:4px;align-items:center;flex-wrap:wrap;font-size:11px;color:var(--muted)}.g span{width:44px}.g button{height:24px;padding:0 9px;border-radius:99px;border:1px solid var(--line);background:var(--surface);font-size:11px;cursor:pointer}.g button[aria-pressed=true]{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}.pr{font-size:12px;line-height:1.5;background:var(--pv);border-radius:8px;padding:6px 10px}.pr mark{background:#ffe28a;color:inherit;border-radius:3px;padding:0 2px}.out{font-size:11.5px;color:var(--muted)}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}const G=[['Light',['soft window light','hard direct sun','strong backlight']],['Lens',['85mm lens','24mm wide lens','200mm telephoto']],['Palette',['warm cream and brown','cool blue and grey','black and white']]],gp=document.getElementById('gp'),sc=document.getElementById('sc'),st=[0,0,0];let last=-1,n=1;
gp.innerHTML=G.map((g,gi)=>'<div class="g" role="group" aria-label="'+g[0]+'"><span>'+g[0]+'</span>'+g[1].map((v,i)=>'<button type="button" data-g="'+gi+'" data-i="'+i+'" aria-pressed="false">'+v.split(' ')[0]+(gi===1?' '+v.split(' ')[1].replace('lens','').trim():'')+'</button>').join('')+'</div>').join('');
const BG=[['#e9dcc8','#cfe0f0','#d9d9d9'],'',''];
function up(){const l=st[0],z=st[1],c=st[2];sc.style.setProperty('--hl',[.6,.9,.3][l]);sc.style.setProperty('--so',[.18,.5,.12][l]);sc.style.setProperty('--sb',['6px','1px','8px'][l]);sc.style.setProperty('--sw',[10,26,-8][l]);
sc.style.setProperty('--sz',[1,1.45,.78][z]);sc.style.setProperty('--bb',['3px','0px','8px'][z===0?0:z===1?1:2]);
sc.style.setProperty('--bgc',[['#e9dcc8','#cfe0f0','#d9d9d9'][c]]);sc.style.setProperty('--cc',[['#8a5a3a','#3a5a8a','#555'][c]]);
const w=G.map((g,gi)=>gi===last?'<mark>'+g[1][st[gi]]+'</mark>':g[1][st[gi]]);document.getElementById('pr').innerHTML='Ceramic coffee cup on a wooden table, '+w[0]+', '+w[1]+', '+w[2]+', calm morning.';
document.getElementById('out').textContent='Version '+n+(last>=0?': only the '+G[last][0].toLowerCase()+' changed.':': the base prompt.');gp.querySelectorAll('button').forEach(b=>b.setAttribute('aria-pressed',String(st[+b.dataset.g]===+b.dataset.i)));}
gp.addEventListener('click',e=>{const b=e.target.closest('button');if(!b)return;const g=+b.dataset.g,i=+b.dataset.i;if(st[g]===i)return;st[g]=i;last=g;n++;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>Change One Variable at a Time — 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}}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}a{color:inherit;text-decoration:none}ul,ol,p,h4{margin:0;padding:0}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.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}
.sc{height:104px;border-radius:12px;position:relative;overflow:hidden;background:var(--bgc)}.sc i{position:absolute;display:block}.bg{inset:0;background:radial-gradient(circle at 20% 30%,rgba(255,255,255,var(--hl)),transparent 55%);filter:blur(var(--bb))}.cu{left:50%;bottom:16px;width:calc(40px*var(--sz));height:calc(34px*var(--sz));margin-left:calc(-20px*var(--sz));border-radius:4px 4px 18px 18px;background:var(--cc)}.sh{left:50%;bottom:10px;height:8px;width:calc(40px*var(--sz) + var(--sw)*1px);margin-left:calc(-20px*var(--sz));border-radius:50%;background:rgba(0,0,0,var(--so));filter:blur(var(--sb))}
.g{display:flex;gap:4px;align-items:center;flex-wrap:wrap;font-size:11px;color:var(--muted)}.g span{width:44px}.g button{height:24px;padding:0 9px;border-radius:99px;border:1px solid var(--line);background:var(--surface);font-size:11px;cursor:pointer}.g button[aria-pressed=true]{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}.pr{font-size:12px;line-height:1.5;background:var(--pv);border-radius:8px;padding:6px 10px}.pr mark{background:#ffe28a;color:inherit;border-radius:3px;padding:0 2px}.out{font-size:11.5px;color:var(--muted)}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
</style></head>
<body><div class="stage">
<div class="bx"><div class="sc" id="sc"><i class="bg"></i><i class="cu"></i><i class="sh"></i></div><div class="gp" id="gp"></div><p class="pr" id="pr"></p><p class="out" id="out"></p></div>
</div>
<script>
const G=[['Light',['soft window light','hard direct sun','strong backlight']],['Lens',['85mm lens','24mm wide lens','200mm telephoto']],['Palette',['warm cream and brown','cool blue and grey','black and white']]],gp=document.getElementById('gp'),sc=document.getElementById('sc'),st=[0,0,0];let last=-1,n=1;
gp.innerHTML=G.map((g,gi)=>'<div class="g" role="group" aria-label="'+g[0]+'"><span>'+g[0]+'</span>'+g[1].map((v,i)=>'<button type="button" data-g="'+gi+'" data-i="'+i+'" aria-pressed="false">'+v.split(' ')[0]+(gi===1?' '+v.split(' ')[1].replace('lens','').trim():'')+'</button>').join('')+'</div>').join('');
const BG=[['#e9dcc8','#cfe0f0','#d9d9d9'],'',''];
function up(){const l=st[0],z=st[1],c=st[2];sc.style.setProperty('--hl',[.6,.9,.3][l]);sc.style.setProperty('--so',[.18,.5,.12][l]);sc.style.setProperty('--sb',['6px','1px','8px'][l]);sc.style.setProperty('--sw',[10,26,-8][l]);
sc.style.setProperty('--sz',[1,1.45,.78][z]);sc.style.setProperty('--bb',['3px','0px','8px'][z===0?0:z===1?1:2]);
sc.style.setProperty('--bgc',[['#e9dcc8','#cfe0f0','#d9d9d9'][c]]);sc.style.setProperty('--cc',[['#8a5a3a','#3a5a8a','#555'][c]]);
const w=G.map((g,gi)=>gi===last?'<mark>'+g[1][st[gi]]+'</mark>':g[1][st[gi]]);document.getElementById('pr').innerHTML='Ceramic coffee cup on a wooden table, '+w[0]+', '+w[1]+', '+w[2]+', calm morning.';
document.getElementById('out').textContent='Version '+n+(last>=0?': only the '+G[last][0].toLowerCase()+' changed.':': the base prompt.');gp.querySelectorAll('button').forEach(b=>b.setAttribute('aria-pressed',String(st[+b.dataset.g]===+b.dataset.i)));}
gp.addEventListener('click',e=>{const b=e.target.closest('button');if(!b)return;const g=+b.dataset.g,i=+b.dataset.i;if(st[g]===i)return;st[g]=i;last=g;n++;up();});up();
</script>
</body></html>