public int mapValueToArgb(final float f) {

        // The single-value palette entries can accept a Float.NaN as
        // a target while the range-of-values entries cannot. So
        // check the single-values before testing for Float.isNaN()
        // because NaN may have special treatment.
        for (final PaletteEntry entry : singleValuePaletteEntries) {
            if (entry.isCovered(f)) {
                return entry.getArgb(f);
            }
        }

        if (Float.isNaN(f)) {
            // if logic reaches here, there is no definition
            // for a NaN.
            return 0;
        }

        for (final PaletteEntry entry : rangePaletteEntries) {
            if (entry.isCovered(f)) {
                return entry.getArgb(f);
            }
        }
        return 0;
    }
Provides a method for mapping a pixel value to an integer (ARGB) value. This method is not defined for the standard photometric interpreters and is
provided as a convenience to applications that are processing data outside the standard TIFF image-reading modules.

@param f the floating point value to be mapped to an ARGB value
@return a valid ARGB value, or zero if no palette specification covers the input value.
src/main/java/org/apache/commons/imaging/formats/tiff/photometricinterpreters/floatingpoint/PhotometricInterpreterFloat.java