(neutralScale: HexColor[], isDark: boolean)
| 514 | } |
| 515 | |
| 516 | function generateNeutralAlphaScale(neutralScale: HexColor[], isDark: boolean): HexColor[] { |
| 517 | const alphas = isDark |
| 518 | ? [0.038, 0.066, 0.1, 0.142, 0.19, 0.252, 0.334, 0.446, 0.58, 0.718, 0.854, 0.985] |
| 519 | : [0.03, 0.06, 0.1, 0.145, 0.2, 0.265, 0.35, 0.47, 0.61, 0.74, 0.86, 0.97] |
| 520 | |
| 521 | return alphas.map((alpha) => blend(neutralScale[11], neutralScale[0], alpha)) |
| 522 | } |
| 523 | |
| 524 | function getHex(value: ColorValue | undefined): HexColor | undefined { |
| 525 | if (!value?.startsWith("#")) return |
no test coverage detected