@smadell created a macros file that creates selections based on luminosity. Perhaps that could help or point in right direction. Macro attached below.     Luminosity Mask.afmacros Luminosity Selections.afmacros