Illustration Style Switcher
The same ball drawn as flat vector, soft clay 3D, low poly and pixel art; switch to see what each keyword means.
AI prompt
A round ball with a bright highlight on a plain background, illustrated as soft clay 3D: smooth rounded forms, matte plasticine surface with subtle fingerprints, soft ambient shading, gentle contact shadow, warm pastel orange against a cream background, shallow depth, friendly toy-like look. Style set: flat vector (solid colours, no gradients, crisp edges, minimal two-tone shading), low poly (faceted triangular planes, three flat tones, geometric), pixel art (32 by 32 grid, limited 8-colour palette, hard pixel edges, no anti-aliasing, retro game sprite). Keep the subject and colours the same across styles. Negative: mixed styles, photorealism, blurry edges, extra objects, text.About this pattern
Definition
An illustration style is the set of rules for how shape, shading, edges and detail are drawn. Naming it in a prompt gives the model a consistent visual language instead of leaving it to chance.
When to use it
- Flat vector: solid shapes, no gradients, crisp edges; ideal for icons, infographics and brand work.
- Clay 3D: soft rounded forms, gentle shading and contact shadow; friendly and tactile.
- Low poly: faceted triangles with a few flat tones; geometric and techy. Pixel art: a coarse grid with limited colours; retro and game-like.
What the controls do
- Four buttons choose the style; the keyword line shows the matching prompt wording.
Motion & timing
- The new style fades in over 200ms.
- Reduced motion: it switches instantly.
Tips & variations
- Flat and low poly scale cleanly; pixel art must be rendered at a small size and enlarged without smoothing.
- Keep one style per project for consistency.
Code of this live preview
<div class="bx"><div class="stg" id="stg"></div><div class="pre" id="pre" role="group" aria-label="Style"><button data-s="flat" aria-pressed="true">Flat</button><button data-s="clay" aria-pressed="false">Clay 3D</button><button data-s="poly" aria-pressed="false">Low poly</button><button data-s="pixel" aria-pressed="false">Pixel</button></div><p class="kw" id="kw" aria-live="polite"></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}
.bx{width:min(300px,100%);display:grid;gap:8px}
.stg{height:130px;border-radius:12px;background:#f1e8d6;display:grid;place-items:center;animation:fd .2s ease-out}
@keyframes fd{from{opacity:.2}}
.f{width:90px;height:90px;border-radius:50%;background:#f08a3c;position:relative}
.f::after{content:"";position:absolute;left:16px;top:14px;width:26px;height:16px;border-radius:50%;background:#f7b277}
.cl{width:92px;height:92px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#ffd5ae,#f29a54 52%,#c9742f);box-shadow:inset -6px -8px 14px rgba(120,60,10,.28),0 16px 14px -8px rgba(90,50,10,.4)}
svg{width:96px;height:96px}
canvas{width:96px;height:96px;image-rendering:pixelated;image-rendering:crisp-edges}
.pre{display:flex;gap:5px}
.pre button{flex:1;height:28px;border-radius:99px;border:1px solid var(--line);background:var(--surface);font:inherit;font-size:11.5px;cursor:pointer}
.pre button[aria-pressed=true]{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.pre button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.kw{font-size:12px;color:var(--muted);line-height:1.4}.kw b{color:var(--text)}
@media (prefers-reduced-motion:reduce){.stg{animation:none}}const stage=document.getElementById('stg'),kw=document.getElementById('kw'),bs=[...document.querySelectorAll('#pre button')];
const T={flat:'solid colours, no gradients, crisp edges, minimal two-tone shading',clay:'smooth rounded forms, matte plasticine, soft shading, gentle contact shadow',poly:'faceted triangular planes, three flat tones, geometric',pixel:'32 by 32 grid, limited palette, hard pixel edges, no anti-aliasing'};
const N={flat:'Flat vector',clay:'Clay 3D',poly:'Low poly',pixel:'Pixel art'};
function poly(){const c=[50,50],R=44,n=8,P=[];for(let i=0;i<n;i++){const a=i/n*6.2832-1.2;P.push([50+R*Math.cos(a),50+R*Math.sin(a)]);}
const tones=['#f7b277','#f08a3c','#e07a2f','#c9702a','#e88a3f','#f4a05a','#d9782e','#c0662a'];let s='';P.forEach((p,i)=>{const q=P[(i+1)%n];s+='<polygon points="'+c+' '+p+' '+q+'" fill="'+tones[i]+'" stroke="'+tones[i]+'" stroke-width=".6"/>';});return '<svg viewBox="0 0 100 100" aria-hidden="true">'+s+'</svg>';}
function pixel(){const cv=document.createElement('canvas');cv.width=cv.height=24;const x=cv.getContext('2d');for(let j=0;j<24;j++)for(let i=0;i<24;i++){const dx=i-11.5,dy=j-11.5,d=Math.hypot(dx,dy);if(d<10.5){const l=(-dx-dy)/20+(10.5-d)/30;x.fillStyle=l>.38?'#f7b277':l>.1?'#f08a3c':l>-.2?'#d9782e':'#b05a22';x.fillRect(i,j,1,1);}}return cv;}
function show(s){stage.style.animation='none';void stage.offsetWidth;stage.style.animation='';stage.innerHTML='';
if(s==='flat')stage.innerHTML='<div class="f"></div>';else if(s==='clay')stage.innerHTML='<div class="cl"></div>';else if(s==='poly')stage.innerHTML=poly();else stage.append(pixel());
kw.innerHTML='<b>'+N[s]+'</b>: '+T[s];bs.forEach(b=>b.setAttribute('aria-pressed',String(b.dataset.s===s)));}
bs.forEach(b=>b.addEventListener('click',()=>show(b.dataset.s)));show('flat');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>Illustration Style Switcher — 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}}
.bx{width:min(300px,100%);display:grid;gap:8px}
.stg{height:130px;border-radius:12px;background:#f1e8d6;display:grid;place-items:center;animation:fd .2s ease-out}
@keyframes fd{from{opacity:.2}}
.f{width:90px;height:90px;border-radius:50%;background:#f08a3c;position:relative}
.f::after{content:"";position:absolute;left:16px;top:14px;width:26px;height:16px;border-radius:50%;background:#f7b277}
.cl{width:92px;height:92px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#ffd5ae,#f29a54 52%,#c9742f);box-shadow:inset -6px -8px 14px rgba(120,60,10,.28),0 16px 14px -8px rgba(90,50,10,.4)}
svg{width:96px;height:96px}
canvas{width:96px;height:96px;image-rendering:pixelated;image-rendering:crisp-edges}
.pre{display:flex;gap:5px}
.pre button{flex:1;height:28px;border-radius:99px;border:1px solid var(--line);background:var(--surface);font:inherit;font-size:11.5px;cursor:pointer}
.pre button[aria-pressed=true]{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.pre button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.kw{font-size:12px;color:var(--muted);line-height:1.4}.kw b{color:var(--text)}
@media (prefers-reduced-motion:reduce){.stg{animation:none}}
</style></head>
<body><div class="stage">
<div class="bx"><div class="stg" id="stg"></div><div class="pre" id="pre" role="group" aria-label="Style"><button data-s="flat" aria-pressed="true">Flat</button><button data-s="clay" aria-pressed="false">Clay 3D</button><button data-s="poly" aria-pressed="false">Low poly</button><button data-s="pixel" aria-pressed="false">Pixel</button></div><p class="kw" id="kw" aria-live="polite"></p></div>
</div>
<script>
const stage=document.getElementById('stg'),kw=document.getElementById('kw'),bs=[...document.querySelectorAll('#pre button')];
const T={flat:'solid colours, no gradients, crisp edges, minimal two-tone shading',clay:'smooth rounded forms, matte plasticine, soft shading, gentle contact shadow',poly:'faceted triangular planes, three flat tones, geometric',pixel:'32 by 32 grid, limited palette, hard pixel edges, no anti-aliasing'};
const N={flat:'Flat vector',clay:'Clay 3D',poly:'Low poly',pixel:'Pixel art'};
function poly(){const c=[50,50],R=44,n=8,P=[];for(let i=0;i<n;i++){const a=i/n*6.2832-1.2;P.push([50+R*Math.cos(a),50+R*Math.sin(a)]);}
const tones=['#f7b277','#f08a3c','#e07a2f','#c9702a','#e88a3f','#f4a05a','#d9782e','#c0662a'];let s='';P.forEach((p,i)=>{const q=P[(i+1)%n];s+='<polygon points="'+c+' '+p+' '+q+'" fill="'+tones[i]+'" stroke="'+tones[i]+'" stroke-width=".6"/>';});return '<svg viewBox="0 0 100 100" aria-hidden="true">'+s+'</svg>';}
function pixel(){const cv=document.createElement('canvas');cv.width=cv.height=24;const x=cv.getContext('2d');for(let j=0;j<24;j++)for(let i=0;i<24;i++){const dx=i-11.5,dy=j-11.5,d=Math.hypot(dx,dy);if(d<10.5){const l=(-dx-dy)/20+(10.5-d)/30;x.fillStyle=l>.38?'#f7b277':l>.1?'#f08a3c':l>-.2?'#d9782e':'#b05a22';x.fillRect(i,j,1,1);}}return cv;}
function show(s){stage.style.animation='none';void stage.offsetWidth;stage.style.animation='';stage.innerHTML='';
if(s==='flat')stage.innerHTML='<div class="f"></div>';else if(s==='clay')stage.innerHTML='<div class="cl"></div>';else if(s==='poly')stage.innerHTML=poly();else stage.append(pixel());
kw.innerHTML='<b>'+N[s]+'</b>: '+T[s];bs.forEach(b=>b.setAttribute('aria-pressed',String(b.dataset.s===s)));}
bs.forEach(b=>b.addEventListener('click',()=>show(b.dataset.s)));show('flat');
</script>
</body></html>