MCPcopy Index your code
hub / github.com/dracula/visual-studio-code / transformSoft

Function transformSoft

scripts/generate.js:37–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35 * @type {ThemeTransform}
36 */
37const 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
57module.exports = async () => {
58 const yamlFile = await readFile(

Callers 1

generate.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected