Backlight, Rim Light & Lens Flare
Slide the sun across the frame; the subject's rim glow and the chain of flare ghosts follow it.
AI prompt
Golden hour portrait of a woman standing in a wheat field, the low sun directly behind her head at the upper right, strong warm rim light outlining her hair and shoulders, soft glow, gentle lens flare with two faint amber ghost circles drifting toward the lower left, face still readable with soft fill from the sky, shallow depth of field, anamorphic feel, hazy air, photographic realism. Variations: sun just outside the frame producing a veiling haze with reduced contrast, full silhouette with no flare for a graphic look. State how much detail should remain in the shadows. Negative: blown-out white face, rainbow artifacts, multiple suns, dirty lens marks.About this pattern
Definition
Backlight puts the light behind the subject. It outlines the edges with a bright rim, can turn the subject into a silhouette and, when the sun is in or near the frame, produces lens flare: ghost circles and haze along a line through the centre.
When to use it
- Rim light separates subjects from the background and adds a warm, cinematic glow, especially at golden hour.
- Flare adds atmosphere and a sense of real optics; too much reduces contrast and hides detail.
- Control it in prompts by sun position, strength and whether detail should remain visible.
What the controls do
- Sun position slider and a Flare strength slider.
Motion & timing
- Positions update live with the sliders.
- Reduced motion: no difference.
Tips & variations
- Flare is strongest when the sun is near the frame edge or inside it; adjust composition rather than relying on post effects.
- Check that faces stay readable on small screens.
Code of this live preview
<div class="bx"><div class="st" id="st"><div class="sun" id="sun"></div><div class="gh" id="g1"></div><div class="gh" id="g2"></div><div class="gh" id="g3"></div><div class="fig" id="fig"><i></i><b></b></div><div class="hz"></div></div>
<div class="two"><label>Sun position <input id="sx" type="range" min="0" max="100" value="68"></label><label>Flare <input id="fl" type="range" min="0" max="100" value="55"></label></div></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(320px,100%);display:grid;gap:8px}
.st{position:relative;height:150px;border-radius:12px;overflow:hidden;background:linear-gradient(#f2a45f,#f7d9a6 62%,#6b5a3c 62%)}
.sun{position:absolute;width:38px;height:38px;margin:-19px;border-radius:50%;background:radial-gradient(circle,#fff,#ffe9a8 45%,rgba(255,200,100,0) 72%);box-shadow:0 0 60px 26px rgba(255,200,110,var(--f,.5))}
.gh{position:absolute;border-radius:50%;opacity:calc(var(--f,.5) * .6);pointer-events:none}
#g1{width:34px;height:34px;margin:-17px;background:radial-gradient(circle,rgba(255,170,90,.7),rgba(255,170,90,0) 70%)}
#g2{width:22px;height:22px;margin:-11px;background:radial-gradient(circle,rgba(120,200,255,.55),rgba(120,200,255,0) 70%)}
#g3{width:50px;height:50px;margin:-25px;border:2px solid rgba(255,220,150,.45);background:radial-gradient(circle,rgba(255,200,120,.12),transparent 70%)}
.fig{position:absolute;left:46%;bottom:20px;width:40px;filter:drop-shadow(0 0 var(--rb,3px) rgba(255,214,140,var(--ra,.8))) drop-shadow(var(--rx,2px) 0 1px rgba(255,214,140,.9))}
.fig i{display:block;width:22px;height:22px;margin:0 auto;border-radius:50%;background:#1d1713}
.fig b{display:block;width:40px;height:60px;margin-top:2px;border-radius:18px 18px 3px 3px;background:#241b16}
.hz{position:absolute;left:0;right:0;top:62%;height:1px;background:rgba(0,0,0,.15)}
.two{display:grid;grid-template-columns:1fr 1fr;gap:10px}.two label{display:grid;gap:3px;font-size:11.5px;color:var(--muted)}input[type=range]{width:100%;accent-color:#171717}
input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
@media (prefers-reduced-motion:reduce){*{transition:none}}const st=document.getElementById('st'),sx=document.getElementById('sx'),fl=document.getElementById('fl'),S=['sun','g1','g2','g3'].map(i=>document.getElementById(i)),fig=document.getElementById('fig');
function up(){const W=st.clientWidth,H=st.clientHeight,x=sx.value/100*W,y=34,cx=W/2,cy=H*.55,f=fl.value/100;st.style.setProperty('--f',f.toFixed(2));
S[0].style.left=x+'px';S[0].style.top=y+'px';[[S[1],.45],[S[2],1.1],[S[3],1.7]].forEach(([e,k])=>{e.style.left=(x+(cx-x)*k)+'px';e.style.top=(y+(cy-y)*k)+'px';});
const d=Math.abs(x-(W*.5)),near=Math.max(0,1-d/(W*.5));fig.style.setProperty('--ra',(.35+.65*near).toFixed(2));fig.style.setProperty('--rb',(2+6*near)+'px');fig.style.setProperty('--rx',(x>W/2?2:-2)+'px');}
sx.addEventListener('input',up);fl.addEventListener('input',up);addEventListener('resize',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>Backlight, Rim Light & Lens Flare — 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(320px,100%);display:grid;gap:8px}
.st{position:relative;height:150px;border-radius:12px;overflow:hidden;background:linear-gradient(#f2a45f,#f7d9a6 62%,#6b5a3c 62%)}
.sun{position:absolute;width:38px;height:38px;margin:-19px;border-radius:50%;background:radial-gradient(circle,#fff,#ffe9a8 45%,rgba(255,200,100,0) 72%);box-shadow:0 0 60px 26px rgba(255,200,110,var(--f,.5))}
.gh{position:absolute;border-radius:50%;opacity:calc(var(--f,.5) * .6);pointer-events:none}
#g1{width:34px;height:34px;margin:-17px;background:radial-gradient(circle,rgba(255,170,90,.7),rgba(255,170,90,0) 70%)}
#g2{width:22px;height:22px;margin:-11px;background:radial-gradient(circle,rgba(120,200,255,.55),rgba(120,200,255,0) 70%)}
#g3{width:50px;height:50px;margin:-25px;border:2px solid rgba(255,220,150,.45);background:radial-gradient(circle,rgba(255,200,120,.12),transparent 70%)}
.fig{position:absolute;left:46%;bottom:20px;width:40px;filter:drop-shadow(0 0 var(--rb,3px) rgba(255,214,140,var(--ra,.8))) drop-shadow(var(--rx,2px) 0 1px rgba(255,214,140,.9))}
.fig i{display:block;width:22px;height:22px;margin:0 auto;border-radius:50%;background:#1d1713}
.fig b{display:block;width:40px;height:60px;margin-top:2px;border-radius:18px 18px 3px 3px;background:#241b16}
.hz{position:absolute;left:0;right:0;top:62%;height:1px;background:rgba(0,0,0,.15)}
.two{display:grid;grid-template-columns:1fr 1fr;gap:10px}.two label{display:grid;gap:3px;font-size:11.5px;color:var(--muted)}input[type=range]{width:100%;accent-color:#171717}
input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
@media (prefers-reduced-motion:reduce){*{transition:none}}
</style></head>
<body><div class="stage">
<div class="bx"><div class="st" id="st"><div class="sun" id="sun"></div><div class="gh" id="g1"></div><div class="gh" id="g2"></div><div class="gh" id="g3"></div><div class="fig" id="fig"><i></i><b></b></div><div class="hz"></div></div>
<div class="two"><label>Sun position <input id="sx" type="range" min="0" max="100" value="68"></label><label>Flare <input id="fl" type="range" min="0" max="100" value="55"></label></div></div>
</div>
<script>
const st=document.getElementById('st'),sx=document.getElementById('sx'),fl=document.getElementById('fl'),S=['sun','g1','g2','g3'].map(i=>document.getElementById(i)),fig=document.getElementById('fig');
function up(){const W=st.clientWidth,H=st.clientHeight,x=sx.value/100*W,y=34,cx=W/2,cy=H*.55,f=fl.value/100;st.style.setProperty('--f',f.toFixed(2));
S[0].style.left=x+'px';S[0].style.top=y+'px';[[S[1],.45],[S[2],1.1],[S[3],1.7]].forEach(([e,k])=>{e.style.left=(x+(cx-x)*k)+'px';e.style.top=(y+(cy-y)*k)+'px';});
const d=Math.abs(x-(W*.5)),near=Math.max(0,1-d/(W*.5));fig.style.setProperty('--ra',(.35+.65*near).toFixed(2));fig.style.setProperty('--rb',(2+6*near)+'px');fig.style.setProperty('--rx',(x>W/2?2:-2)+'px');}
sx.addEventListener('input',up);fl.addEventListener('input',up);addEventListener('resize',up);up();
</script>
</body></html>