What are you trying to achieve?
I'd like to set a white balance based on either a custom colour or the brightest pixel in the image:

Have you searched for similar questions?
Yes. Any help is appreciated, even a starting point of some sort — I am clueless.
Are you able to provide a minimal, standalone code sample that demonstrates this question?
Any image will do sharp("image.jpg")
Are you able to provide a sample image that helps explain the question?

What are you trying to achieve?
I'd like to set a white balance based on either a custom colour or the brightest pixel in the image:
Have you searched for similar questions?
Yes. Any help is appreciated, even a starting point of some sort — I am clueless.
Are you able to provide a minimal, standalone code sample that demonstrates this question?
Any image will do
sharp("image.jpg")Are you able to provide a sample image that helps explain the question?