You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
384 B
14 lines
384 B
|
|
export const COLOR_VERY_BAD = "#F66";
|
|
export const COLOR_BAD = "#FBB";
|
|
export const COLOR_NEUTRAL = "#FFF";
|
|
export const COLOR_GOOD = "#BFB";
|
|
export const COLOR_VERY_GOOD = "#6F6";
|
|
|
|
export const colorByDiff = (diff, prevDiff) => {
|
|
if (diff < 0) {
|
|
return diff < prevDiff ? COLOR_VERY_BAD : COLOR_BAD;
|
|
} else {
|
|
return diff > prevDiff ? COLOR_VERY_GOOD : COLOR_GOOD;
|
|
}
|
|
};
|