src/main/java/nl/meine/sortingvisualiser/helpers/ColorHelper.java
/**
     * @param value should be from 0 unti 1
     * @return
     */
@param value should be from 0 unti 1
@return
@param value should be from 0 unti 1 @return
public Color numberToColorPercentage(final double value) {
        if (value < 0 || value > 1) {
            return null;
        }
        Double d = value * factor;
        int index = d.intValue();
        if (index == factor) {
            index--;
        }
        return map.get(index);
    }
public Color numberToColorPercentage ( final double value ) { if ( value < 0 || value > 1 ) { return null ; } Double d = value * factor ; int index = d . intValue ( ) ; if ( index == factor ) { index -- ; } return map . get ( index ) ; }
@param value should be from 0 unti 1
 @return
@param value should be from 0 unti 1 @return