
Stacking certificates
Hover, Images
The white balance panel of a made-up raw photo editor, Kestrel Raw, dark and polished like a Dribbble shot: on top a real photo of a mountain lake at dawn with a long pale granite rock in the water, drawn on a canvas, below it the Temperature and Tint sliders. Dragging them the light of the whole photo changes live, from cold blue to amber, the Kelvin roll on their strips of digits, the RGB histogram slides and the glow under the card takes the photo's colour. With the eyedropper you touch the pale rock, the point that should be grey, and the photo corrects itself.
A folder that runs on its own: index.html, style.css, script.js and the libraries from a CDN. The React and Vue tabs hold the same demo as a ready component, which switches its animations off when it leaves the page.
<!doctype html>
<!--
"Colour temperature slider" from Animorio · https://animorio.com
License: free on your own sites and your clients’ sites, paid work included.
Not for resale, redistribution, templates or code collections · https://animorio.com/en/license/
-->
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>The colour temperature slider of the photo with the eyedropper</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<main class="stage">
<!-- the white balance panel of a raw photo editor, Kestrel Raw. The photo (lago.webp, a real CC0 photo of a lake at
dawn under a granite shore, a long pale rock in the water) is drawn on a canvas and shown through the white balance: drag Temperature and Tint and the
light of the whole picture shifts live, the Kelvin roll, the RGB histogram slides and the glow under the card
takes the photo's colour. The eyedropper picks a neutral point: the pale rock, and the photo corrects itself -->
<div class="wb" data-wrap>
<span class="wb__spill" data-spill aria-hidden="true"></span>
<article class="wb__card" data-card>
<div class="wb__photo" data-photo>
<canvas class="wb__canvas" data-canvas aria-label="A lake at dawn with a long pale rock in the water" role="img"></canvas>
<canvas class="wb__ghost" data-ghost aria-hidden="true"></canvas>
<span class="wb__sheen" aria-hidden="true"></span>
<span class="wb__chip" aria-hidden="true">
<span class="wb__chip-face" data-state>As shot</span>
<span class="wb__chip-face" data-state>Custom</span>
<span class="wb__chip-face" data-state>Picking</span>
<span class="wb__chip-face" data-state>Neutral</span>
</span>
<span class="wb__histo" aria-hidden="true"><canvas data-histo></canvas></span>
<span class="wb__pulse" data-pulse aria-hidden="true"></span>
<span class="wb__picker" data-picker aria-hidden="true">
<span class="wb__ring" data-ring><span class="wb__ring-dot" data-ring-dot></span></span>
<svg class="wb__pipette" viewBox="0 0 24 24">
<path class="wb__pipette-body" d="M14.6 4.6l4.8 4.8M16.4 3.2a2.1 2.1 0 0 1 3 0l1.4 1.4a2.1 2.1 0 0 1 0 3l-2 2-4.4-4.4 2-2zM13.9 7.1l3 3-7.6 7.6-3.4.4.4-3.4 7.6-7.6z"/>
<path class="wb__pipette-tip" d="M5.9 18.1L3.6 20.4"/>
</svg>
</span>
<span class="wb__exif" aria-hidden="true">24 mm f/5.6 1/250</span>
</div>
<header class="wb__head">
<span class="wb__titles">
<span class="wb__title">White balance</span>
<span class="wb__file">DSC_0418 in Kestrel Raw</span>
</span>
<span class="wb__tools">
<button class="wb__reset" type="button" data-reset>Reset</button>
<button class="wb__drop" type="button" data-drop aria-label="Pick a neutral point" aria-pressed="false">
<span class="wb__drop-face" data-drop-face>
<svg viewBox="0 0 24 24" aria-hidden="true">
<path d="M14.6 4.6l4.8 4.8M16.4 3.2a2.1 2.1 0 0 1 3 0l1.4 1.4a2.1 2.1 0 0 1 0 3l-2 2-4.4-4.4 2-2zM13.9 7.1l3 3-7.6 7.6-3.4.4.4-3.4 7.6-7.6z"/>
<path d="M5.9 18.1L3.6 20.4"/>
</svg>
</span>
</button>
</span>
</header>
<div class="wb__ctl">
<div class="wb__row">
<span class="wb__name">Temperature</span>
<span class="wb__val" data-kelvin aria-hidden="true"></span>
</div>
<div class="wb__track wb__track--temp" data-track="temp" role="slider" tabindex="0" aria-label="Temperature"
aria-valuemin="2000" aria-valuemax="12000" aria-valuenow="5200">
<span class="wb__rail" aria-hidden="true"></span>
<span class="wb__notch" data-notch aria-hidden="true"></span>
<span class="wb__thumb" data-thumb="temp" aria-hidden="true"><span class="wb__thumb-face" data-face="temp"></span></span>
</div>
</div>
<div class="wb__ctl">
<div class="wb__row">
<span class="wb__name">Tint</span>
<span class="wb__val wb__val--tint" data-tint aria-hidden="true">0</span>
</div>
<div class="wb__track wb__track--tint" data-track="tint" role="slider" tabindex="0" aria-label="Tint"
aria-valuemin="-40" aria-valuemax="40" aria-valuenow="0">
<span class="wb__rail" aria-hidden="true"></span>
<span class="wb__notch wb__notch--mid" aria-hidden="true"></span>
<span class="wb__thumb" data-thumb="tint" aria-hidden="true"><span class="wb__thumb-face" data-face="tint"></span></span>
</div>
</div>
</article>
</div>
<p class="sr" aria-live="polite" data-live></p>
</main>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
<script src="script.js"></script>
</body>
</html>Change values, colours and text with the controls and watch the animation respond live. Or write in the code yourself. Then download the folder with your changes.
30 values to change
With the Animorio connector, Claude Code, ChatGPT, Cursor or VS Code take it from here, guide included, and fit it into your project. Paste this request:
Take “Colour temperature slider” from Animorio and fit it into my siteThe photo (lago.webp, a real CC0 photo) is drawn once on an offscreen canvas, cropped like object-fit: cover and a little below the middle, to keep the rock and its reflection. It is redrawn only when the box changes size, and the point of the rock is worked out again from the crop.
At each change the photo is composed again: the original, then with multiply a rectangle in the colour of the three gains (red and blue opposite for the temperature, green for the tint), then the original again in luminosity mode at 60%, which brings the light back without taking the colour away. So the photo changes tone without going dark.
The eyedropper reads the original under the ring (an average of a few pixels with getImageData) and solves backwards the gains that make red and blue equal, then green: out come the Kelvin and the tint. On the granite rock, a little blue at dawn, they come out as about 7000 K and a tint close to zero.
The values chase their target on a spring integrated by hand in two steps per frame, both when the demo moves them on its own (a GSAP timeline moving the target) and under the finger. The Kelvin are five columns of digits from 0 to 9: each column turns toward its digit the shortest way.
The same composition on a small canvas, 96 by 64, gives the pixels for the histogram (40 bins per channel, smoothed, drawn with lighter), the colour under the ring and the average that tints the glow under the card through a CSS variable.
| Name | File | Default | What it changes |
|---|---|---|---|
AS_SHOT | script.js | 5200 | The Kelvin the camera wrote: the photo starts here, a little cold. |
AS_SHOT_TINT | script.js | -9 | The tint the camera wrote (minus is green). |
STRENGTH | script.js | 1 | How strongly temperature and tint colour the photo. |
LIFT | script.js | 0.6 | How much of the original photo's light is laid back over the colour (0 = darker). |
STIFFNESS | script.js | 210 | The spring of the thumbs: higher is quicker. |
DAMPING | script.js | 21 | Lower lets the thumbs pass the mark and come back. |
SPEED | script.js | 1 | 2 = the walk on its own twice as fast, 0.5 = half. |
LOOP | script.js | true | Repeats the walk. |
For the site of a photographer or a retouching studio, the page of a photo app or a photography course, a portfolio that wants to show its colour work: a real panel you can touch.
The same animation with adapted sizes: the card is almost as wide as the box, the photo gets lower with the height, the thumbs are dragged with a finger and the eyedropper takes the point you touch.
No running thumbs or flying rings: the photo goes from one balance to the next with a fade (as shot, warm, neutral) and the values are already in place; under the finger the sliders and the eyedropper work the same.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 15 KB; the libraries: GSAP 28 KB.
Tested on 6 November 2026
Use it in your own projects and in your clients’ projects. Do not resell it or redistribute it as is. GSAP stays under its own Standard license. Full license.
Support Animorio
Animorio stays free thanks to the people who support it. If you like, buy us a coffee: it helps us make the next animations.
You asked for
We made it for you: it’s in the library, with the preview, the Playground and the code to copy.
An animation you can’t find, or a site to take apart in the journal: tell us which. We pick the next ones from here.
With your account’s email and password.
or with your email
You’re signed in as .
With your account, you can download the zip of every animation and every pack, for free.