feat: 새 설문조사 모듈 UI
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import _colorNames from 'css-color-names';
|
||||
|
||||
const colorNames = _colorNames as Record<string, string>;
|
||||
|
||||
const colors: string[] = [
|
||||
"red", "orange", "yellow", "green", "blue", "navy", "purple"
|
||||
].map(color => colorNames[color]);
|
||||
|
||||
export function formatVoteColor(type: number): string {
|
||||
return colors[type % colors.length];
|
||||
}
|
||||
Reference in New Issue
Block a user