Although we see colors such as red and green very distinctly, they often appear very similar in a black-and-white image. This can result in a flat photo where striking contrasts are lost in the translation to gray.
This problem can be overcome with the use of color filters, which allow analogous colors of light through to the film and block out complementary (opposing) colors. In short, they lighten similar colors and darken opposite colors, allowing the photographer to exercise some selective control over tonal values.
Although as a color photo a red flower on a background of green foliage has strong chromatic contrast, as a black-and-white photo the flower and foliage will convert to a similar gray, so the flower will lack definition and blend in with the background. If a red filter were used, it would allow the red light through the lens but block the green, resulting in a light flower on dark foliage. If a green filter were used, it would do the opposite, admitting the green and blocking the red light, rendering the foliage a light gray and the flower a dark gray. Both filters create tonal differences and restore contrast between the subject and background. Yellow filters are the classic choice for use with black-and-white film. They lighten warm colors; darken cold, blue-based colors; and generally make everything, especially skin tones, look more natural.
There is a large number of color filters available, and their effects can be estimated from their relative position on the color spectrum. For example, orange sits between yellow and red in the spectrum, and orange filters are in the middle of yellow and red filters in terms of effect. Orange filters give stronger effects than those given by yellow filters, but the results are not as dramatic as those given by red filters. Red filters are fairly extreme and will render a blue sky close to black.
Opposite are details of the exposure compensation needed and the effects of the main color filters used with black-and-white film.