(color: string)
| 50 | } |
| 51 | |
| 52 | function parseHexColor(color: string): number { |
| 53 | if (typeof color === 'string') { |
| 54 | if (color.startsWith('#')) { |
| 55 | let hex = color.slice(1) |
| 56 | let size = hex.length |
| 57 | let i = 0, step = size > 4 ? 1 : 0 |
| 58 | |
| 59 | let r = parseInt(hex[i] + hex[i += step], 16); |
| 60 | let g = parseInt(hex[++i] + hex[i += step], 16) |
| 61 | let b = parseInt(hex[++i] + hex[i += step], 16) |
| 62 | let a = 255 |
| 63 | |
| 64 | if (size === 4 || size === 8) { |
| 65 | a = parseInt(hex[++i] + hex[i += step], 16) |
| 66 | } |
| 67 | |
| 68 | return ((a << 24) | (b << 16) | (g << 8) | r) >>> 0 |
| 69 | } |
| 70 | } |
| 71 | return 0 |
| 72 | } |
| 73 | |
| 74 | function applyWindowEffectMac(name: EffectName, options) { |
| 75 | if (name === 'vibrancy') { |
no outgoing calls
no test coverage detected