Any number of channel and adjustment effects combined or things like Leave Color, but really, your question is too broad and generic. You will have to be much more specific and provide sample screenshots and a proper explanation since e.g. "luminosity" itself is a completely arbitrary thing.
[Any image will do.]
Details: all the colors in the image should become black (not grayscale, pure black) except the colors in the range:
HSB 0, 0, 87 to HSB 0, 0, 100.
The simple Threshold or CC threshold effects that come with AE will give you that. You will just have to convert the percentages to absolute values and dial them in.
The simple Threshold or CC threshold effects that come with AE will give you that.
It partially worked.
I obtained pure black from every color except the ones in the specified HSB range.
But the colors in that range became pure white, whereas I needed them to remain unaffected (with their original values).
Any way to do that?