( fontColor: string | undefined, customColorList = "", )
| 40 | }; |
| 41 | |
| 42 | export const generateAutoGradient = ( |
| 43 | fontColor: string | undefined, |
| 44 | customColorList = "", |
| 45 | ) => { |
| 46 | if (customColorList !== "") |
| 47 | return generateSelectColor(gradient, fontColor, customColorList); |
| 48 | |
| 49 | const auto = gradient[Math.floor(Math.random() * gradient.length)]; |
| 50 | return [auto.color, fontColor ? fontColor : auto.text, auto.textBg]; |
| 51 | }; |
| 52 | |
| 53 | export const generateAutoByTime = (queryColor: string, fontColor?: string) => { |
| 54 | if (queryColor === "timeAuto") return randomizedByTime(pallete, fontColor); |
no test coverage detected