I am writing an application with multiple colored surfaces. I would like to preserve luminance, i.e. a blue surface would appear as bright as a green one, are there tools to help for this?
The usual way of doing this is to work in a color space that has luminance as one of the color components. For example the Y'CbCr color space has a luminance channel (you can think of this as similar to brightness which is a poorly defined term) and 2 chrominance or color channels. There are other color spaces that separate colors in this way, too, such as HSV, HLS, Lab, etc.
There are conversions to go between RGB and these various color spaces. The article linked above shows some of the conversions for going between Y'CbCr and sRGB, for example.
You don't say what type of graphics library you'll be using, so it's hard to give any more detail than what I've given you here. But I've done this in OpenGL, Core Graphics, and others. It shouldn't be too difficult.
Edited to add: I should point out that HSV defines value or "brightness" not as luminance but as the average of red, green, and blue, and as such does not track very will with our intuitive sense of brightness. HLS also suffers from some issues (discontinuities, bad but popular reference implementations) and is generally not recommended by the color scientists that I know.