( fontColor: string | undefined, customColorList = "", )
| 28 | }; |
| 29 | |
| 30 | export const generateAutoColor = ( |
| 31 | fontColor: string | undefined, |
| 32 | customColorList = "", |
| 33 | ) => { |
| 34 | if (customColorList !== "") |
| 35 | return generateSelectColor(pallete, fontColor, customColorList); |
| 36 | |
| 37 | const idx = Math.floor(Math.random() * pallete.length); |
| 38 | const auto = pallete[idx]; |
| 39 | return [auto.color, fontColor ? fontColor : auto.text, auto.textBg]; |
| 40 | }; |
| 41 | |
| 42 | export const generateAutoGradient = ( |
| 43 | fontColor: string | undefined, |
no test coverage detected