(index: number)
| 50 | * @param index option.color |
| 51 | */ |
| 52 | export function getFieldOptionColor(index: number) { |
| 53 | const hue = COLOR_INDEX_NAME[index % COLOR_INDEX_NAME.length]!; |
| 54 | const level = Math.floor(index / COLOR_INDEX_NAME.length); |
| 55 | const baseColorValue = COLOR_MAP[hue]; |
| 56 | const value = getColorValue(baseColorValue, COLOR_LEVEL_ALPHA[level]!); |
| 57 | return { |
| 58 | name: `${hue}_${level}`, |
| 59 | value, |
| 60 | }; |
| 61 | } |
| 62 | |
| 63 | /** |
| 64 | * get all color name array, index is color number |
no test coverage detected