(
seed: HexColor,
alpha: { base: number; weak: number; weaker: number; strong: number; stronger: number },
)
| 51 | return content(colors.warning, warning) |
| 52 | } |
| 53 | const surface = ( |
| 54 | seed: HexColor, |
| 55 | alpha: { base: number; weak: number; weaker: number; strong: number; stronger: number }, |
| 56 | ) => { |
| 57 | const base = alphaTone(seed, alpha.base) |
| 58 | return { |
| 59 | base, |
| 60 | weak: alphaTone(seed, alpha.weak), |
| 61 | weaker: alphaTone(seed, alpha.weaker), |
| 62 | strong: alphaTone(seed, alpha.strong), |
| 63 | stronger: alphaTone(seed, alpha.stronger), |
| 64 | } |
| 65 | } |
| 66 | const background = backgroundHex ?? neutral[0] |
| 67 | const alphaTone = (color: HexColor, alpha: number) => |
| 68 | overlay ? (withAlpha(color, alpha) as ColorValue) : blend(color, background, alpha) |
no test coverage detected