(brightColor: ColorInput, factor: number = 0.2)
| 237 | * @returns The same color with reduced alpha for background-independent dimming |
| 238 | */ |
| 239 | export function deriveInactiveColor(brightColor: ColorInput, factor: number = 0.2): RGBA { |
| 240 | const baseRgba = brightColor instanceof RGBA ? brightColor : RGBA.fromHex(brightColor as string) |
| 241 | |
| 242 | // Use the full color brightness but adjust alpha for background-independent dimming |
| 243 | return RGBA.fromValues(baseRgba.r, baseRgba.g, baseRgba.b, factor) |
| 244 | } |
| 245 | |
| 246 | export type KnightRiderStyle = "blocks" | "diamonds" |
| 247 |
no outgoing calls
no test coverage detected