(css: string)
| 21 | } |
| 22 | |
| 23 | function cssHexString(css: string) { |
| 24 | let rrggbb = '#'; |
| 25 | let start: number | undefined = undefined; |
| 26 | for (let loop = 0; loop < 3; loop++) { |
| 27 | let end = 0; |
| 28 | let xx = ''; |
| 29 | for (let loop = 0; loop < 2; loop++) { |
| 30 | for (;;) { |
| 31 | const x = css.slice(end, end + 1); |
| 32 | if (x == '(' || x == ',' || x == ')') break; |
| 33 | end++; |
| 34 | } |
| 35 | if (loop == 0) { |
| 36 | end++; |
| 37 | start = end; |
| 38 | } |
| 39 | } |
| 40 | assert(start !== undefined, 'true by construction'); |
| 41 | xx = parseInt(css.slice(start, end)).toString(16); |
| 42 | if (xx.length == 1) xx = `0${xx}`; |
| 43 | rrggbb += xx; |
| 44 | css = css.slice(end); |
| 45 | } |
| 46 | return rrggbb; |
| 47 | } |
| 48 | |
| 49 | function getDefaultLayoutComboBox( |
| 50 | tilingLayouts: string[], |
no test coverage detected