A grey hoodie photographed on a kitchen table at seven in the evening comes out biscuit brown. The white mailer behind it is cream. Your eyes saw grey and white in the room, the sensor recorded something else, and the difference only became obvious when the picture landed on a product page next to the words “heather grey”.
Nothing in that photo is broken. The light was orange, the camera guessed wrong about how orange it was, and the guess was applied to every pixel evenly. That last part is what makes a cast worth attacking: an even wrong assumption can be divided back out. Blur cannot be undone. A cast usually can.
The correction is one click. You point at something in the frame that was neutral in real life, the software reads what was actually recorded at that spot, and it scales the three colour channels until that patch reads neutral again. One point, three numbers, whole picture.
Click something that was neutral
The sample loaded below is a 900 by 600 product still life under a simulated tungsten cast, with a neutral grey card standing in the frame. Click the card. The three factors printed under the picture are the entire correction, and the draggable divider puts the corrected copy against the untouched original: same screen, same second, one drag apart, which is the only honest way to judge a colour change.
All of it happens in your own browser tab. A photo you drop in is read with FileReader and an object URL, so there is no upload and no request of any kind, and no download button either, which the footer explains rather than hides.
White balance fixer
Load a photo, click something in it that ought to be neutral, and the colour cast goes. You get the three channel factors that did it, a before and after you can drag across, and two fine sliders for the rest. The picture is read, drawn and corrected in this browser tab: nothing is uploaded and nothing leaves the page.
No reference yet.
or press Enter to pick one. It is read on your own machine and never sent anywhere.
Drag the white divider across the picture to compare the two sides, and reach for the arrow keys once the reference is set: they walk it a pixel at a time.
These two are plain channel weights and make no claim to kelvin: temperature moves red up and blue down by up to 30 percent each, tint moves green by up to 24 percent and red and blue by 12 the other way. They run after the click correction, and each one snaps back to a hard zero within four points of the middle so you can always find neutral again.
There is no download button here, and that is on purpose. What this page is for is seeing what a cast looks like and checking that a neutral really does go neutral; the article shows where to put the same three factors in your own editor, on the full-size file and, if you shot raw, on the raw data where a white balance actually belongs.
Where casts come from
Light has a colour. A candle sits near 1900 K, a warm household bulb around 2700 K, an overcast sky around 6500 K, and open shade under a clear blue sky can run past 8000 K. Your eyes deal with this automatically: within seconds of walking into a room you stop seeing the orange, because human vision renormalises to whatever illuminant it has been given. A sensor does not renormalise. It records the light that arrived.
So the camera has to guess on your behalf. Auto white balance looks at the frame and estimates which illuminant lit it, and it is fooled by exactly the things a small shop photographs: a large block of one colour. A red jumper filling the frame, a green lawn behind a bike, a warm wooden table under a flat lay. The algorithm reads the dominant colour as a property of the light rather than of the subject and corrects in the wrong direction.
Mixed light is worse, because it has no right answer. Window on one side, desk lamp on the other, and the camera commits to one of them. Cheap LED bulbs make it messier still: their spectrum has spikes rather than a smooth curve, so two bulbs sold as the same colour temperature can render the same fabric differently.
One thing worth separating before you start pulling sliders: a cast is a tint, not a fade. If your uploads look pale and lifeless rather than orange or blue, and they looked fine in your editor before they went into the media library, that is a colour profile problem and not a white balance one. Washed out images in WordPress have their own cause and their own fix, and no amount of channel scaling will address it.
Why clicking a neutral works
A neutral surface reflects red, green and blue in equal measure. That is the definition of neutral. So if you know a patch in the picture was neutral, you know what it should read: three equal numbers. Whatever it actually reads tells you exactly what the light did.
The tool takes a 5 by 5 average around the pixel you clicked, which is 25 samples, and treats that as the reference. It works out the mean brightness of the reference and divides that mean by each channel in turn. Three quotients come out, one per channel, and every pixel in the picture is multiplied by them.
reference, 5 by 5 average R 214 G 178 B 126
mean = (214 + 178 + 126) / 3 = 172.67
factorR = 172.67 / 214 = 0.81
factorG = 172.67 / 178 = 0.97
factorB = 172.67 / 126 = 1.37
every pixel: R * 0.81, G * 0.97, B * 1.37
That is the whole idea. The grey card is forced to be grey, and the rest of the picture rides along on the same three multipliers, which is correct precisely because the light was wrong everywhere by the same amount.
Two guards keep the arithmetic sane. A divisor floor of 1 stops a near black pixel producing an enormous quotient, and the factors are clamped to the window 0.4 to 2.5. Click a pure black shadow and you learn nothing, so the factors stay at 1 and the picture does not move. Click something dark but not black and you get a strong correction rather than an explosion.
The 5 by 5 window earns its place a second way: one blown pixel, a speck of noise or a tiny specular glint, gets absorbed by the other 24 instead of tipping the correction. If a click lands slightly off, the arrow keys walk the reference a pixel at a time on the focused picture, Shift moves it ten, and Enter sets a first reference at the centre. Pixel indices come from a floor rather than a round: at the size the sample is displayed, one screen pixel spans more than two picture pixels, and rounding would hand back the neighbour for every click landing in the right half of one. Pictures wider than 1200 pixels are processed at 1200, and the factors come out the same as at full size.
Auto is an assumption, not an answer
The Auto button runs grey world: it assumes that averaging every pixel in the picture ought to give neutral, and it levels the three channel averages until it does. Fully transparent pixels are skipped, so a cut out product does not drag the average.
That is a decent opening move on a varied scene and plainly wrong on a picture that is mostly one colour. Photograph a terracotta pot against a cream wall and grey world concludes the room was orange and drains the pot. Hence the label: use it to get in the neighbourhood, then click an actual neutral to land.
Temperature and tint come after the click
Casts run along two axes, not one. The first is warm against cool, red against blue, which is the axis that real illuminants travel along as they get hotter or colder. The second is the leftover: green against magenta, the axis that fluorescent tubes and some LEDs push you off onto. Correct only the first and a fluorescent shot still looks faintly sick.
Both sliders in the tool run from -100 to +100 and multiply on top of the click correction rather than replacing it. Temperature applies up to 30 percent on red and on blue in opposite directions. Tint applies up to 24 percent on green against 12 percent on red and blue. Neither claims kelvin and the interface says so, because a genuine colour temperature conversion needs the camera’s own sensor response and the raw data behind the JPEG, and neither of those is on a web page.
Each slider has a hard zero detent within four points of the middle, so getting back to no adjustment at all takes a nudge rather than a steady hand. The combined result of click factors and slider factors is held inside the same 0.4 to 2.5 window, which means the three numbers printed on screen are always the numbers the picture actually received. Copy the factors puts those three multipliers and both slider positions on the clipboard as a single line, and Reset clears the reference, both sliders and re-centres the divider.
The order matters. Click first, slide second. The click is measurement, the sliders are taste, and taste applied before measurement just gives the measurement a moving target.
Habits that make this a five second job
Correction is trivial when the shot contains something to correct against, and fiddly when it does not. Four habits cover nearly everything a shop or a blog shoots.
- Put a neutral in the frame. A photographic grey card costs less than a single returned parcel. Failing that, use a piece of grey or white foam board. Avoid ordinary printer paper: most of it carries optical brighteners that fluoresce under any ultraviolet in the room and read distinctly blue, which teaches the correction a lie.
- Shoot one reference frame per session. Hold the card in the scene, take one frame, then take it out and shoot the rest. Correct that frame, copy the three factors, apply the same numbers to the whole session. The set then matches, which per photo eyeballing never achieves.
- Lock the camera to a preset. Auto white balance re-guesses on every frame, so a batch shot on auto arrives with a batch of different casts. A fixed preset gives you one consistent wrong answer, and one wrong answer is one correction.
- Kill the mixed light. Close the blind or switch the lamp off. Shooting under a single light source is not a stylistic choice, it is the difference between a problem with a solution and a problem without one.
One caveat on all four: pick a neutral that is properly lit. A card in shadow reads dark and noisy, and a card catching a highlight is reading the bulb rather than the scene.
Where a global correction stops
Three multipliers apply to the whole picture. That is the strength and the ceiling. If two light sources lit the scene, there is no single set of three numbers that is right for both halves: correct for the lamp and the window side turns blue, correct for the window and the lamp side glows. Fixing that properly needs masked local corrections, one per region, which is a different and much slower job than clicking a card.
The second wall is clipping. If the blue channel already hit 255 across a highlight, there is no value left there to scale; multiplying 255 by 1.37 still gives you 255 after the clamp to the range, and the flat white area stays flat. Whatever detail the sensor threw away is gone, and a white balance tool cannot invent it. The same is true at the bottom, where a channel crushed to 0 has nothing to lift. This tool does not attempt clipped pictures and says so.
Colour bounce is the third case that looks like a cast and is not. A red wall a metre from a white mug throws red onto one side of it. The illuminant is fine and the mug really is red there, so scaling the whole frame makes everything else cyan. Move the mug.
Some things this page deliberately does not attempt: it does not read the white balance the camera recorded in EXIF, it does not open raw files, and it does not run a chromatic adaptation matrix such as Bradford or von Kries, the more rigorous way to move a scene from one illuminant to another. Scaling three channels is the simple approximation of that maths. Close enough for web images, not close enough for colour critical print.
The cast that costs money
On a blog a warm photo is a mood. On a shop it is a refund. A sage green cushion photographed under a warm bulb photographs as a dull olive, or under a north window as mint, and the customer who ordered it based on your picture sends it back. You pay the outbound postage, the return postage, the restock time, and sometimes a review that says the colour is nothing like the photo.
The other cost is quieter. A category grid of eight products shot across four evenings under four lighting mixes looks amateur before a visitor can say why. Nobody thinks “inconsistent white balance”. They think the shop looks thrown together. Correcting each set against its own reference frame makes a grid look bought rather than assembled.
Do the correction before anything downstream touches the file. WordPress cuts every upload into several sizes, and WooCommerce decides its catalogue, single and thumbnail dimensions from three settings of its own. Correct the master and every derivative inherits the fix. Correct a 300 pixel thumbnail and you get to do it again for every size, and forget one.
Where to apply the three numbers
Apply them as early in the chain and as high up the quality ladder as you can reach. Raw is best, because raw data is linear and unclipped and scaling channels in it costs nothing. A high quality JPEG off the camera is the usual reality and is fine. Avoid correcting a file that has already been resized, sharpened and re-saved twice, because every JPEG save quantises what is left.
Keep the correction removable while you work. A non-destructive method means the original pixels are still there when you decide the shot was actually meant to look warm, or when you realise the card was in shadow. If you are working inside WordPress, WunderPaint’s Adjust panel carries Temperature and white balance controls alongside Levels and Curves, and its adjustments are live and non-destructive, so a correction can be dialled back or removed later rather than baked in.
Per channel curves do the same job with more control and more rope. Pulling the blue curve up at the shadow end and down at the highlight end corrects a cast that is stronger in the shadows than the highlights, which channel multipliers cannot do because they scale everything uniformly. Curves are worth understanding for exactly this reason, and once the cast is gone, deliberate grading is a separate and much more enjoyable decision than accidental orange.
The click is not the skill
White balance is one of the very few photographic problems with an exact answer. Most of editing is judgement: how much contrast, how warm, how much crop. This one is arithmetic. A patch was neutral, it did not record as neutral, and the ratio between those two states is the correction. That is why one click fixes a photograph that looked hopeless, and why the same fix repeats across a whole set of frames.
The click itself is trivial. Choosing what to click is the skill, and it is decided when you take the picture, not when you edit it. A frame with a grey card takes five seconds to correct. A frame without one takes ten minutes of nudging two sliders and still leaves you unsure whether the beige is the product or the room.
So the useful takeaway is not a slider position. It is a piece of cardboard in the corner of the shot, one reference frame at the start of each session, and one light source on. Do that and the correction becomes a copied line of three numbers, applied to a whole batch, done before the pictures ever reach the media library.