(argbTheme: ARGBTheme)
| 98 | }; |
| 99 | |
| 100 | const prepareElevations = (argbTheme: ARGBTheme) => { |
| 101 | let elevations: Record<string, string> = { |
| 102 | level0: 'transparent', |
| 103 | }; |
| 104 | |
| 105 | const { primary, surface } = argbTheme; |
| 106 | |
| 107 | for (let i = 0; i < elevationLevels.length; i++) { |
| 108 | elevations[`level${i + 1}`] = Color(surface) |
| 109 | .mix(Color(primary), Number(elevationLevels[i])) |
| 110 | .rgb() |
| 111 | .string(); |
| 112 | } |
| 113 | |
| 114 | return elevations; |
| 115 | }; |
| 116 | |
| 117 | export const getPreviewColors = (theme: Record<string, any>) => { |
| 118 | const preview = { ...theme }; |
no outgoing calls
no test coverage detected
searching dependent graphs…