Assessing the "Lightness" of a selected region?
I am applying a logo to multiple pictures, and if the background for the location of the logo is dark, I want to use white text for the logo, but if the background for the location of the logo is light, I would like to use black text for the logo.
I'm already using a script to add the logo to the picture as a layer, so ideally I'd like to have some additional scripting text that would
- select the region of the background where the logo will go (the regioin dimensions of which I know), and then
- make a "Lightness" or "Darkness" assessment of the selected region
I'm guessing this might be relatively trivial to a more experienced scripter, but I'm still a newbie, and hence I don't have a clue.
Thanks in advance!
Brian
