MCPcopy Create free account
hub / github.com/hydro-dev/Hydro / getScoreColor

Function getScoreColor

packages/common/status.ts:92–107  ·  view source on GitHub ↗
(score: number | string)

Source from the content-addressed store, hash-verified

90];
91
92export function getScoreColor(score: number | string): string {
93 if (score === null || score === undefined || !Number.isFinite(+score)) return '#000000';
94 return [
95 '#ff4f4f',
96 '#ff694f',
97 '#f8603a',
98 '#fc8354',
99 '#fa9231',
100 '#f7bb3b',
101 '#ecdb44',
102 '#e2ec52',
103 '#b0d628',
104 '#93b127',
105 '#25ad40',
106 ][Math.floor((Number(score) || 0) / 10)];
107}
108
109export const USER_GENDER_MALE = 0;
110export const USER_GENDER_FEMALE = 1;

Callers 1

initChartFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected