We develop a method for automatic colorization of images (or two-dimensional fields) in order to visualize pixel values and their local differences. In many applications, local differences in pixel values are as important as their values. For example, in topography, both elevation and slope often must be considered. Gradient-based value mapping (GBVM) is a technique for colorizing pixels based on value (e.g., intensity or elevation) and gradient (e.g., local differences or slope). The method maps pixel values to a color scale (either gray-scale or pseudocolor) in a manner that emphasizes gradients in the image while maintaining ordinal relationships of values. GBVM is especially useful for high-precision data, in which the number of possible values is large. Colorization with GBVM is demonstrated with data from comprehensive two-dimensional gas chromatography (GCxGC), using both gray-scale and pseudocolor to visualize both small and large peaks, and with data from the Global Land One-Kilometer Base Elevation (GLOBE) Project, using gray-scale to visualize features that are not visible in images produced with popular value-mapping algorithms.