public function getColorInRange($value)
    {
        $a = [54, 170, 31];
        $b = [220, 1, 57];
        [$min, $max] = $this->extremes;
        $d = $max - $min;
        $lin = ($value - $min) / ($d ?: 0.5); // prevent x/0
        $color = [];
        for ($i = 0; $i < 3; ++$i) {
            $color[$i] = (int) ($a[$i] + ($b[$i] - $a[$i]) * $lin);
        }

        return 'rgb(' . \implode(',', $color) . ')';
    }