We investigate the problem of averaging values on lattices and, in particular, on discrete product lattices. This problem arises in image processing when several color values given in RGB, HSL, or another coding scheme need to be combined. We show how the arithmetic mean and the median can be constructed by minimizing appropriate penalties, and we discuss which of them coincide with the Cartesian product of the standard mean and the median. We apply these functions in image processing. We present three algorithms for color image reduction based on minimizing penalty functions on discrete product lattices.