Class ColorRamp

java.lang.Object
privbot.ui.overlay.ColorRamp

public final class ColorRamp extends Object
A value-to-colour rule, so a threshold ladder is written once and reused.

Replaces the copies of ticksLeft <= 1 ? RED : ticksLeft <= 2 ? ORANGE : YELLOW and pct <= threshold * 0.5 ? DANGER : pct <= threshold ? WARN : GOOD in the plugin overlays.