Warm vs Cool Temperature
Slide white balance from cold blue to warm amber and read the mood each Kelvin range brings.
AI prompt
Cosy living room at night lit by a single tungsten lamp at 2700 Kelvin, warm amber glow on the sofa and wooden floor, deep warm shadows, a window showing a cool blue 8000 Kelvin evening outside as colour contrast, soft shallow depth of field, quiet intimate mood, photographic realism. Temperature variants: neutral daylight 5600 Kelvin (clean and honest), cold overcast 7500 Kelvin (distant, clinical), candlelight 1900 Kelvin (very warm, romantic). Negative: mixed random colours, green cast, orange faces, flat grey lighting.About this pattern
Definition
Colour temperature, measured in Kelvin, describes whether light looks warm (orange, low K) or cool (blue, high K). Warm tones feel cosy and intimate; cool tones feel clinical, lonely or futuristic.
When to use it
- About 2700 K is candlelight and tungsten, 5600 K is daylight, 8000 K and above is shade or moonlit blue.
- Mixed temperatures (warm lamp against cool window) create depth and a story.
- Give a Kelvin value or a clear word (tungsten, daylight, moonlight) in prompts.
What the controls do
- A Kelvin slider from 2000 to 9000 changes the room; the note names the mood.
Motion & timing
- Colour changes live with the slider.
- Reduced motion: no difference.
Tips & variations
- Phone screens shift colour; check with auto-brightness and night mode off.
- Keep skin tones plausible; extreme warmth turns faces orange.
Code of this live preview
<div class="bx"><div class="rm" id="rm"><div class="win"></div><div class="lamp"></div><div class="sofa"></div></div>
<label class="ctl">Temperature <b id="kv">5600 K</b><input id="k" type="range" min="20" max="90" value="56"></label><p class="out" id="out" 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}
.rm{position:relative;height:140px;border-radius:12px;overflow:hidden;background:#d9d4c8;filter:sepia(var(--se,0)) hue-rotate(var(--hr,0deg)) saturate(1.1)}
.rm::after{content:"";position:absolute;inset:0;background:var(--tint,transparent);mix-blend-mode:multiply;pointer-events:none}
.win{position:absolute;right:20px;top:16px;width:60px;height:70px;background:linear-gradient(#cfe0f2,#eaf2fa);border:5px solid #f5f2ea}
.lamp{position:absolute;left:30px;top:20px;width:22px;height:30px;border-radius:50% 50% 8px 8px;background:#ffe3a8;box-shadow:0 0 30px 10px rgba(255,214,140,.7)}
.sofa{position:absolute;left:30px;right:30px;bottom:14px;height:44px;border-radius:14px 14px 6px 6px;background:#8a6a55}
.ctl{display:grid;gap:3px;font-size:11.5px;color:var(--muted)}.ctl b{color:var(--text)}
input[type=range]{width:100%;accent-color:#171717}input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.out{font-size:12px;color:var(--muted);line-height:1.4}.out b{color:var(--text)}
@media (prefers-reduced-motion:reduce){*{transition:none}}const k=document.getElementById('k'),rm=document.getElementById('rm'),out=document.getElementById('out');
function up(){const K=k.value*100,t=(K-5600)/3400,w=Math.max(0,-t),c=Math.max(0,t);
rm.style.setProperty('--tint','rgb('+Math.round(255-c*75)+','+Math.round(255-w*55-c*30)+','+Math.round(255-w*115)+')');rm.style.setProperty('--se',(w*.12).toFixed(2));rm.style.setProperty('--hr',(c*-8)+'deg');
document.getElementById('kv').textContent=K+' K';const m=K<3000?['Candlelight and tungsten','very warm, romantic, intimate']:K<4500?['Warm white','cosy, friendly, evening']:K<6500?['Daylight','neutral, honest, clean']:K<8000?['Cool overcast','distant, calm, clinical']:['Blue shade or moonlight','cold, lonely, futuristic'];
out.innerHTML='<b>'+m[0]+'</b>: '+m[1];}
k.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>Warm vs Cool Temperature — 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}
.rm{position:relative;height:140px;border-radius:12px;overflow:hidden;background:#d9d4c8;filter:sepia(var(--se,0)) hue-rotate(var(--hr,0deg)) saturate(1.1)}
.rm::after{content:"";position:absolute;inset:0;background:var(--tint,transparent);mix-blend-mode:multiply;pointer-events:none}
.win{position:absolute;right:20px;top:16px;width:60px;height:70px;background:linear-gradient(#cfe0f2,#eaf2fa);border:5px solid #f5f2ea}
.lamp{position:absolute;left:30px;top:20px;width:22px;height:30px;border-radius:50% 50% 8px 8px;background:#ffe3a8;box-shadow:0 0 30px 10px rgba(255,214,140,.7)}
.sofa{position:absolute;left:30px;right:30px;bottom:14px;height:44px;border-radius:14px 14px 6px 6px;background:#8a6a55}
.ctl{display:grid;gap:3px;font-size:11.5px;color:var(--muted)}.ctl b{color:var(--text)}
input[type=range]{width:100%;accent-color:#171717}input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.out{font-size:12px;color:var(--muted);line-height:1.4}.out b{color:var(--text)}
@media (prefers-reduced-motion:reduce){*{transition:none}}
</style></head>
<body><div class="stage">
<div class="bx"><div class="rm" id="rm"><div class="win"></div><div class="lamp"></div><div class="sofa"></div></div>
<label class="ctl">Temperature <b id="kv">5600 K</b><input id="k" type="range" min="20" max="90" value="56"></label><p class="out" id="out" aria-live="polite"></p></div>
</div>
<script>
const k=document.getElementById('k'),rm=document.getElementById('rm'),out=document.getElementById('out');
function up(){const K=k.value*100,t=(K-5600)/3400,w=Math.max(0,-t),c=Math.max(0,t);
rm.style.setProperty('--tint','rgb('+Math.round(255-c*75)+','+Math.round(255-w*55-c*30)+','+Math.round(255-w*115)+')');rm.style.setProperty('--se',(w*.12).toFixed(2));rm.style.setProperty('--hr',(c*-8)+'deg');
document.getElementById('kv').textContent=K+' K';const m=K<3000?['Candlelight and tungsten','very warm, romantic, intimate']:K<4500?['Warm white','cosy, friendly, evening']:K<6500?['Daylight','neutral, honest, clean']:K<8000?['Cool overcast','distant, calm, clinical']:['Blue shade or moonlight','cold, lonely, futuristic'];
out.innerHTML='<b>'+m[0]+'</b>: '+m[1];}
k.addEventListener('input',up);up();
</script>
</body></html>