( input: ColorValue, light: string, dark: string )
| 3 | import color from 'color'; |
| 4 | |
| 5 | export default function getContrastingColor( |
| 6 | input: ColorValue, |
| 7 | light: string, |
| 8 | dark: string |
| 9 | ): string { |
| 10 | if (typeof input === 'string') { |
| 11 | return color(input).isLight() ? dark : light; |
| 12 | } |
| 13 | |
| 14 | return light; |
| 15 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…