src/Util/Color.php
public static function gauge($val, $floor = 0)
    {
        $colors = self::getGaugeColors();
        $key_size =    100 / count($colors);
        $key = floor($val / $key_size);
        return (array_key_exists((int) $key, $colors)) ? $colors[$key] : end($colors);
    }
public static function gauge($val, $floor = 0)
    {
        $colors = self::getGaugeColors();
        $key_size =    100 / count($colors);
        $key = floor($val / $key_size);
        return (array_key_exists((int) $key, $colors)) ? $colors[$key] : end($colors);
    }
public static function gauge ( $ val , $ floor = 0 ) { $ colors = self :: getGaugeColors ( ) ; $ key_size = 100 / count ( $ colors ) ; $ key = floor ( $ val / $ key_size ) ; return ( array_key_exists ( ( int ) $ key , $ colors ) ) ? $ colors [ $ key ] : end ( $ colors ) ; }
Turn a val to a color for a gauge
@param $val Val from 0 to 100
@return string Hex
Turn a val to a color for a gauge