Texture is one of many important features to capture in image characteristics. A recent texture unit-based texture spectrum approach, referred to as texture unit coding (TUC) developed by Wang and He has shown promise in texture classification. We present a new texture feature extraction coding, called gradient texture unit coding (GTUC) that is based on Wang and He's texture unit to capture gradient changes in a texture unit. Since the GTUC also generates an 8-D ternary texture feature vector in the same way that the TUC does, a GTUC-generated feature vector can be further represented by a number in the same range generated by the TUC. As a result, the GTUC-generated numbers also form a texture spectrum similar to that formed by the TUC-generated numbers. By normalizing a texture spectrum as a probability distribution, this work further develops an information divergence (ID)-based discrimination criterion to measure the discrepancy between two texture spectra, a concept yet to be explored in texture analysis. To compare the GTUC to the TUC in texture classification, several criteria used in hyperspectral image analysis are also introduced for performance analysis.