There was a recent thread on the GIMP users forum at Flickr on how to generate luminosity masks (and use them I suppose). I figured I would chime in a bit here with how I generate and use them in my own workflow. There is an older and interesting discussion about Luminosity Masks by Tony Kuyper that was referenced in that thread, and this is a translation of sorts for GIMP users that want to accomplish the same thing. The original tutorial by Tony is here: Tony Kuyper’s Luminosity Masks Tutorial
The basic premise of luminosity masks is to allow you to modify elements of a layer masked to a specific region of luminosity (or value). If I wanted to control the colors in the shadows of my image without modifying the mid tones or light tones, then this is the method you want. Similarly you can adjust just the mid tones, or light tones without affecting the other regions as well.
If you are new to layer masks (or need to brush up), I recommend you head to Getting Around in GIMP - Layer Masks to brush up first, then come back.