($color: string)
| 441 | } |
| 442 | |
| 443 | function getSystemColor($color: string): RGBA { |
| 444 | const n = systemColors.get($color)!; |
| 445 | return { |
| 446 | r: (n >> 16) & 255, |
| 447 | g: (n >> 8) & 255, |
| 448 | b: (n >> 0) & 255, |
| 449 | a: 1, |
| 450 | }; |
| 451 | } |
| 452 | |
| 453 | // lowerCalcExpression is a helper function that tries to remove `calc(...)` |
| 454 | // expressions from the given string. It can only lower expressions to a certain |