| 35 | * @type {ThemeTransform} |
| 36 | */ |
| 37 | const transformSoft = theme => { |
| 38 | /** @type {Theme} */ |
| 39 | const soft = JSON.parse(JSON.stringify(theme)); |
| 40 | const brightColors = [...soft.dracula.ansi, ...soft.dracula.brightOther]; |
| 41 | for (const key of Object.keys(soft.colors)) { |
| 42 | if (brightColors.includes(soft.colors[key])) { |
| 43 | soft.colors[key] = tinycolor(soft.colors[key]) |
| 44 | .desaturate(20) |
| 45 | .toHexString(); |
| 46 | } |
| 47 | } |
| 48 | soft.tokenColors = soft.tokenColors.map((value) => { |
| 49 | if (brightColors.includes(value.settings.foreground)) { |
| 50 | value.settings.foreground = tinycolor(value.settings.foreground).desaturate(20).toHexString(); |
| 51 | } |
| 52 | return value; |
| 53 | }) |
| 54 | return soft; |
| 55 | }; |
| 56 | |
| 57 | module.exports = async () => { |
| 58 | const yamlFile = await readFile( |