Tweaking the auto white balance of RawTherapee

(Alberto) #1

Hello all,
while I generally find the auto white balance method of RawTherapee to be much more consistent than what my camera (a Sony a6000) gives, it tends to produce a temperature that is “too cold” for my tastes.
So, during the weekend I was playing with the idea of letting the user have some control over the AWB algorithm. I thought about a “bias” that can be used to have RawTherapee select a warmer or cooler temperature. In order to test whether this made sense, I just implemented it :slight_smile: Here’s a screenshot of my modified RawTherapee which explains the feature:

I must say I am quite happy with the results, so I was wondering:

  • does this make sense at all? or maybe there’s some obvious reason why this is a bad idea?
  • would somebody be interested in this? I can try submitting a patch/pull request in this case


I like this feature. For me, AWB is s usually too warm. :grinning:

(Morgan Hardwood) #3

@agriggio great to have you involved, could you open a PR on GitHub? Let us know if you need help with that.

(Alberto) #4

sure! I’ll try to do it tomorrow evening.


@agriggio Makes sense to me, I like it.

(Alberto) #6

If anyone is curious, the code is here:


I was curious and compiled a Windows version (x64. Gtk3.22) :slight_smile:

If somebody wants to test ist, download it from here:

No installer included. Extract the folder “Rawtherapee_AWB” to e.g. your Desktop and run “rawtherapee_AWB.exe” inside this folder.
Cache and settings are saved into “%localappdata%\Rawtherapee_AWB”. It leaves your current installation untouched.


I’ve found two issues.

  1. Changing the AWB bias slider should not change the WB Method to “Custom”
  2. AWB bias is not stored in profiles.

(Alberto) #9

hmmm, strange, both should not happen. I’ll try to see what is going wrong. thanks for testing!

(Alberto) #10

also see


Hellp, I hava a similar problem with the WB, when I want to customize it. On single files, I can just use the slider, but for automatization I would recommend to implement the idea of setting WB by a formula, what is amore general approach and will include the functionality of your proposed fine tuning slider too. There is camera WB info (guesstimation), there is RT auto (guesstimation), there is apersonal preference cooler or hotter, and there is the wish of guys like me to preserve a little of the WB “look”, e.g. no full compensation but keep tungsten indoor fotos slightly warmer and cloudy outdoor fotos colder (but not too much). Also, two independent guessing algorythms tend deviate less from the “real value” in most cases, if averaging over both is done. So why not implement the possibility to enter a formula based on the variables WB cam and WB auto, like in my case,
for example. Another user who likes auto WB but a little warmer, might enter:
"WBauto +400K"
Just an idea. Also that green <-> magenta guessing could improve typically if one could do an average of what the camera thinks and what RT thinks.

To give everybody the ultimate hit in confusion, I just need to add that what we call cool is very hot and what we call hot is cooler. 5700K sun surface is way hotter than “just” 2900K glowing tungsten surface in a light bulb. Please everybody think about that and consider using hot and cold in the right way.

(Alberto) #12

Hi @Viennatom,
and thanks for the feedback!

I think this is an interesting idea in principle, but it’s a bit harder to implement than the simple bias slider. At the moment, I have no time to work on this, as my time is limited and I have other things I’d like to try in RawTherapee first. However, the Auto WB bias slider has now been integrated in the dev branch of RT, so perhaps you can give it a try and see whether it might serve your needs.