Hair Light Separation
A dark-haired subject on a dark background: add a hair light and a background light to separate them.
AI prompt
Studio portrait of a man with dark hair and a dark charcoal jacket against a dark grey background, a thin bright rim of light along the top of his hair and shoulders from a hair light behind and above, a soft pool of light on the wall behind his head, key light soft from the front left, subject clearly separated from the background, 85mm lens, natural skin tones. Variant: the same portrait without hair light where hair and background merge. Negative: lens flare, overexposed hair, harsh shadows, text, watermark. Reduced motion: still image.About this pattern
Definition
When dark hair meets a dark background, the head melts into the scene. A hair light, a small light high behind the subject, adds a thin bright edge on hair and shoulders. A light on the background, even a faint one, makes a gradient behind the head. Together they separate the subject and add depth.
When to use it
- Place the hair light behind and above the subject, pointing down at about 45 degrees; use a grid or flag to keep it off the lens.
- Keep the power low, about half to a quarter of the key, so it outlines instead of glowing.
- Light the background separately for a soft pool of light behind the head.
- Watch for spill on the face and for flare in the lens.
What the controls do
- Three setups and a Hair light power slider.
Motion & timing
- Updates are immediate.
- Reduced motion: nothing animates.
Tips & variations
- A hair light can look harsh on bald or very light hair; reduce the power.
- Flag light from the camera side so it only touches the hair.
Code of this live preview
<div class="bx"><div class="pre" id="pre" role="group" aria-label="Setup"><button data-p="0" aria-pressed="true">No hair light</button><button data-p="1" aria-pressed="false">Hair light</button><button data-p="2" aria-pressed="false">Hair + background</button></div><div class="st" id="st"><i class="bg"></i><div class="sh"></div><div class="hd"><i class="hr"></i><i class="fc"></i></div></div><label class="rw">Hair light power <b id="pv">60%</b><input id="ps" type="range" min="0" max="100" value="60"></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}
.st{position:relative;height:140px;border-radius:12px;overflow:hidden;background:#1b1c20;display:grid;place-items:end center}.st .bg{position:absolute;inset:0;background:radial-gradient(ellipse at 50% 38%,rgba(150,160,185,var(--bgl,0)),transparent 60%)}.sh{position:absolute;bottom:-6px;width:150px;height:56px;border-radius:70px 70px 0 0;background:#25262c;box-shadow:inset 0 3px 0 -1px rgba(255,255,255,var(--hl,0)),inset 0 8px 10px -8px rgba(190,205,255,var(--hl,0))}.hd{position:relative;bottom:36px;width:66px;height:84px}.hr{position:absolute;left:-2px;right:-2px;top:-4px;height:50px;border-radius:50% 50% 30% 30%;background:#1a1613;box-shadow:inset 0 4px 4px -2px rgba(255,255,255,var(--hl,0)),0 -1px 0 rgba(200,215,255,var(--hl,0)),0 0 8px rgba(190,205,255,calc(var(--hl,0)*.5));z-index:2;clip-path:polygon(0 100%,0 40%,16% 8%,84% 8%,100% 40%,100% 100%,86% 56%,14% 56%)}.fc{position:absolute;inset:0;border-radius:44% 44% 46% 46%/38% 38% 58% 58%;background:#a8805f;box-shadow:inset 0 -6px 12px rgba(40,20,10,.35)}.out{font-size:12px;color:var(--muted);min-height:16px;margin:0}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}const st=document.getElementById('st'),ps=document.getElementById('ps'),bs=[...document.querySelectorAll('#pre button')],NT=['Hair and shoulders melt into the dark background.','A thin bright edge outlines hair and shoulders.','The edge light plus a soft pool of light behind the head: clear separation.'];let p=1;
function up(){const h=ps.value/100*(p===0?0:1);st.style.setProperty('--hl',h.toFixed(2));st.style.setProperty('--bgl',p===2?.5:0);document.getElementById('pv').textContent=ps.value+'%';ps.disabled=p===0;document.getElementById('out').textContent=NT[p];bs.forEach(b=>b.setAttribute('aria-pressed',String(+b.dataset.p===p)));}
bs.forEach(b=>b.addEventListener('click',()=>{p=+b.dataset.p;up();}));ps.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>Hair Light Separation — 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}
.st{position:relative;height:140px;border-radius:12px;overflow:hidden;background:#1b1c20;display:grid;place-items:end center}.st .bg{position:absolute;inset:0;background:radial-gradient(ellipse at 50% 38%,rgba(150,160,185,var(--bgl,0)),transparent 60%)}.sh{position:absolute;bottom:-6px;width:150px;height:56px;border-radius:70px 70px 0 0;background:#25262c;box-shadow:inset 0 3px 0 -1px rgba(255,255,255,var(--hl,0)),inset 0 8px 10px -8px rgba(190,205,255,var(--hl,0))}.hd{position:relative;bottom:36px;width:66px;height:84px}.hr{position:absolute;left:-2px;right:-2px;top:-4px;height:50px;border-radius:50% 50% 30% 30%;background:#1a1613;box-shadow:inset 0 4px 4px -2px rgba(255,255,255,var(--hl,0)),0 -1px 0 rgba(200,215,255,var(--hl,0)),0 0 8px rgba(190,205,255,calc(var(--hl,0)*.5));z-index:2;clip-path:polygon(0 100%,0 40%,16% 8%,84% 8%,100% 40%,100% 100%,86% 56%,14% 56%)}.fc{position:absolute;inset:0;border-radius:44% 44% 46% 46%/38% 38% 58% 58%;background:#a8805f;box-shadow:inset 0 -6px 12px rgba(40,20,10,.35)}.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="Setup"><button data-p="0" aria-pressed="true">No hair light</button><button data-p="1" aria-pressed="false">Hair light</button><button data-p="2" aria-pressed="false">Hair + background</button></div><div class="st" id="st"><i class="bg"></i><div class="sh"></div><div class="hd"><i class="hr"></i><i class="fc"></i></div></div><label class="rw">Hair light power <b id="pv">60%</b><input id="ps" type="range" min="0" max="100" value="60"></label><p class="out" id="out"></p></div>
</div>
<script>
const st=document.getElementById('st'),ps=document.getElementById('ps'),bs=[...document.querySelectorAll('#pre button')],NT=['Hair and shoulders melt into the dark background.','A thin bright edge outlines hair and shoulders.','The edge light plus a soft pool of light behind the head: clear separation.'];let p=1;
function up(){const h=ps.value/100*(p===0?0:1);st.style.setProperty('--hl',h.toFixed(2));st.style.setProperty('--bgl',p===2?.5:0);document.getElementById('pv').textContent=ps.value+'%';ps.disabled=p===0;document.getElementById('out').textContent=NT[p];bs.forEach(b=>b.setAttribute('aria-pressed',String(+b.dataset.p===p)));}
bs.forEach(b=>b.addEventListener('click',()=>{p=+b.dataset.p;up();}));ps.addEventListener('input',up);up();
</script>
</body></html>