Style Reference Strength
How a reference image's influence grows from subtle to dominant, shown on one scene with a strength slider.
AI prompt
Series of four images of the same small house under a sun on a green hill, with an attached reference painting of warm orange and teal brush strokes: at low strength natural colours with a faint warm tint, at medium strength the palette and visible brush texture follow the reference, at high strength the whole picture becomes the orange and teal painterly style with softer shapes, the composition identical in every image. Negative: different subjects, text, watermark, photo realism. Reduced motion: still images.About this pattern
Definition
Many image tools let you attach a style reference and set how strongly it applies. At low strength the model keeps its own look and borrows a hint of palette; at high strength it copies colour, texture and mood and may override your subject. Finding the middle gives a recognisable style with your own content.
When to use it
- Low: your subject and natural colours with a hint of the reference palette.
- Medium: palette, texture and lighting follow the reference; subject stays clear.
- High: the reference dominates; shapes and details may drift.
- Change only strength between tries and keep the text prompt fixed.
What the controls do
- A strength slider with three presets.
Motion & timing
- Updates are immediate.
- Reduced motion: nothing animates.
Tips & variations
- Use reference images you have the right to use.
- A strong reference can fight a detailed text prompt; reduce one of them.
Code of this live preview
<div class="bx"><div class="pre" id="pre" role="group" aria-label="Strength"><button data-p="0" aria-pressed="true">Low</button><button data-p="1" aria-pressed="false">Medium</button><button data-p="2" aria-pressed="false">High</button></div><div class="two"><div class="rf" role="img" aria-label="Reference style: warm orange and teal brush strokes"><i></i><i></i><i></i><i></i><small>Reference</small></div><div class="sn" id="sn" role="img" aria-label="Result image"><div class="sc" id="sc"><i class="su"></i><i class="hl"></i><i class="hs"></i><i class="ho"></i></div><b class="tx" id="tx"></b></div></div><label class="rw">Strength <b id="sv"></b><input id="ss" type="range" min="0" max="100" value="50"></label><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}
.rf{position:relative;height:110px;border-radius:12px;overflow:hidden;background:#f2a457}.rf i{position:absolute;display:block;border-radius:50%;filter:blur(2px)}.rf i:nth-child(1){left:-10%;top:10%;width:70%;height:50%;background:#e3592f;transform:rotate(-20deg)}.rf i:nth-child(2){right:-10%;top:30%;width:70%;height:60%;background:#1c8a8f}.rf i:nth-child(3){left:20%;bottom:-20%;width:60%;height:50%;background:#14575f}.rf i:nth-child(4){right:10%;top:6%;width:30%;height:30%;background:#ffd36a}.rf small{position:absolute;left:6px;bottom:4px;font-size:10px;font-weight:700;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.4)}.sn{position:relative;height:110px;border-radius:12px;overflow:hidden}.sc{position:absolute;inset:0;background:linear-gradient(#8ac4f0,#d6ecfb);filter:var(--fl,none)}.sc i{position:absolute;display:block}.su{right:14%;top:12%;width:20px;height:20px;border-radius:50%;background:#ffd23f;box-shadow:0 0 14px #ffd23f}.hl{left:-10%;bottom:-30%;width:90%;height:68%;border-radius:50%;background:#4aa84f}.hs{left:30%;bottom:24%;width:36px;height:24px;background:#d9c7a4}.ho{left:calc(30% - 4px);bottom:calc(24% + 24px);width:44px;height:16px;background:#c9372c;clip-path:polygon(50% 0,100% 100%,0 100%)}.tx{position:absolute;inset:0;pointer-events:none;mix-blend-mode:multiply;opacity:var(--to,0);background:radial-gradient(circle at 20% 30%,#f2a457 0,transparent 45%),radial-gradient(circle at 80% 70%,#1c8a8f 0,transparent 50%)}.two{display:grid;grid-template-columns:1fr 1fr;gap:12px}.out{font-size:12px;color:var(--muted);min-height:16px;margin:0}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}const sn=document.getElementById('sn'),sc=document.getElementById('sc'),ss=document.getElementById('ss'),bs=[...document.querySelectorAll('#pre button')],PR=[15,50,90];
function up(){const w=ss.value/100;sc.style.setProperty('--fl','hue-rotate('+(w*-18)+'deg) saturate('+(1+w*.5)+') contrast('+(1+w*.18)+') sepia('+(w*.35)+') blur('+(w*w*1.4)+'px)');sn.style.setProperty('--to',(w*.75).toFixed(2));document.getElementById('sv').textContent=ss.value+'%';
document.getElementById('out').textContent=w<.3?'Low: your colours and shapes, with a hint of the reference palette.':w<.7?'Medium: palette and texture follow the reference; subject stays clear.':'High: the reference dominates; shapes soften and may drift.';
bs.forEach(b=>b.setAttribute('aria-pressed',String(+b.dataset.p===PR.reduce((m,x,i)=>Math.abs(x-ss.value)<Math.abs(PR[m]-ss.value)?i:m,0)&&Math.abs(PR[+b.dataset.p]-ss.value)<=20)));}
bs.forEach(b=>b.addEventListener('click',()=>{ss.value=PR[+b.dataset.p];up();}));ss.addEventListener('input',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>Style Reference Strength — 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}
.rf{position:relative;height:110px;border-radius:12px;overflow:hidden;background:#f2a457}.rf i{position:absolute;display:block;border-radius:50%;filter:blur(2px)}.rf i:nth-child(1){left:-10%;top:10%;width:70%;height:50%;background:#e3592f;transform:rotate(-20deg)}.rf i:nth-child(2){right:-10%;top:30%;width:70%;height:60%;background:#1c8a8f}.rf i:nth-child(3){left:20%;bottom:-20%;width:60%;height:50%;background:#14575f}.rf i:nth-child(4){right:10%;top:6%;width:30%;height:30%;background:#ffd36a}.rf small{position:absolute;left:6px;bottom:4px;font-size:10px;font-weight:700;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.4)}.sn{position:relative;height:110px;border-radius:12px;overflow:hidden}.sc{position:absolute;inset:0;background:linear-gradient(#8ac4f0,#d6ecfb);filter:var(--fl,none)}.sc i{position:absolute;display:block}.su{right:14%;top:12%;width:20px;height:20px;border-radius:50%;background:#ffd23f;box-shadow:0 0 14px #ffd23f}.hl{left:-10%;bottom:-30%;width:90%;height:68%;border-radius:50%;background:#4aa84f}.hs{left:30%;bottom:24%;width:36px;height:24px;background:#d9c7a4}.ho{left:calc(30% - 4px);bottom:calc(24% + 24px);width:44px;height:16px;background:#c9372c;clip-path:polygon(50% 0,100% 100%,0 100%)}.tx{position:absolute;inset:0;pointer-events:none;mix-blend-mode:multiply;opacity:var(--to,0);background:radial-gradient(circle at 20% 30%,#f2a457 0,transparent 45%),radial-gradient(circle at 80% 70%,#1c8a8f 0,transparent 50%)}.two{display:grid;grid-template-columns:1fr 1fr;gap:12px}.out{font-size:12px;color:var(--muted);min-height:16px;margin:0}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
</style></head>
<body><div class="stage">
<div class="bx"><div class="pre" id="pre" role="group" aria-label="Strength"><button data-p="0" aria-pressed="true">Low</button><button data-p="1" aria-pressed="false">Medium</button><button data-p="2" aria-pressed="false">High</button></div><div class="two"><div class="rf" role="img" aria-label="Reference style: warm orange and teal brush strokes"><i></i><i></i><i></i><i></i><small>Reference</small></div><div class="sn" id="sn" role="img" aria-label="Result image"><div class="sc" id="sc"><i class="su"></i><i class="hl"></i><i class="hs"></i><i class="ho"></i></div><b class="tx" id="tx"></b></div></div><label class="rw">Strength <b id="sv"></b><input id="ss" type="range" min="0" max="100" value="50"></label><p class="out" id="out"></p></div>
</div>
<script>
const sn=document.getElementById('sn'),sc=document.getElementById('sc'),ss=document.getElementById('ss'),bs=[...document.querySelectorAll('#pre button')],PR=[15,50,90];
function up(){const w=ss.value/100;sc.style.setProperty('--fl','hue-rotate('+(w*-18)+'deg) saturate('+(1+w*.5)+') contrast('+(1+w*.18)+') sepia('+(w*.35)+') blur('+(w*w*1.4)+'px)');sn.style.setProperty('--to',(w*.75).toFixed(2));document.getElementById('sv').textContent=ss.value+'%';
document.getElementById('out').textContent=w<.3?'Low: your colours and shapes, with a hint of the reference palette.':w<.7?'Medium: palette and texture follow the reference; subject stays clear.':'High: the reference dominates; shapes soften and may drift.';
bs.forEach(b=>b.setAttribute('aria-pressed',String(+b.dataset.p===PR.reduce((m,x,i)=>Math.abs(x-ss.value)<Math.abs(PR[m]-ss.value)?i:m,0)&&Math.abs(PR[+b.dataset.p]-ss.value)<=20)));}
bs.forEach(b=>b.addEventListener('click',()=>{ss.value=PR[+b.dataset.p];up();}));ss.addEventListener('input',up);up();
</script>
</body></html>