Files
orion-visor/orion-visor-ui/src/utils/charts.ts

11 lines
265 B
TypeScript
Raw Normal View History

2025-09-09 21:25:44 +08:00
// 获取百分比进度状态
export const getPercentProgressColor = (percent: number) => {
if (percent < 0.6) {
return 'rgb(var(--green-6))';
} else if (percent < 0.8) {
return 'rgb(var(--orange-6))';
} else {
return 'rgb(var(--red-6))';
}
};