diff --git a/src/components/ThemeControls.tsx b/src/components/ThemeControls.tsx index 2287f73..1b5e902 100644 --- a/src/components/ThemeControls.tsx +++ b/src/components/ThemeControls.tsx @@ -51,7 +51,7 @@ const ThemeControls: React.FC = () => { const handleRandomize = (few = false) => { const newBaseHue = Math.floor(Math.random() * 360) const newUiSaturation = randomInteger(15, 65) - const newSyntaxSaturation = randomInteger(10, 65) + const newSyntaxSaturation = randomInteger(20, 65) const schemeValues = Object.values(ColorScheme).filter( (value) => typeof value === 'number' ) as number[] diff --git a/src/components/ThemePreview.tsx b/src/components/ThemePreview.tsx index 5bd89c8..993a226 100644 --- a/src/components/ThemePreview.tsx +++ b/src/components/ThemePreview.tsx @@ -7,6 +7,7 @@ import { IGrammarDefinition, Registry, RegistryOptions } from 'monaco-textmate' import { wireTmGrammars } from 'monaco-editor-textmate' import { generateSemanticThemeJSON } from '@/lib/generator/export' import { convertTheme } from '@/lib/utils/convertTheme' +import Color from 'color' interface ITokenEntry { name?: string @@ -91,7 +92,59 @@ const codeSnippets = { ' );\n' + '};\n' + '\n' + - 'export default UserProfile;\n', + 'export default UserProfile;\n' + + 'import type {\n' + + ' UIColors,\n' + + ' SyntaxColors,\n' + + ' AnsiColors,\n' + + ' VSCodeTheme,\n' + + '} from "@/lib/types/colors"\n' + + '\n' + + 'import Color from "color"\n' + + '\n' + + 'export function generateSemanticThemeJSON(\n' + + ' name: string = "Generated Color Theme",\n' + + ' colors: UIColors,\n' + + ' syntaxColors: SyntaxColors,\n' + + ' ansiColors: AnsiColors\n' + + '): { themeJSON: string; themeObject: VSCodeTheme } {\n' + + ' const theme = {\n' + + ' name: name,\n' + + ' type: Color(colors.BG1).isDark()\n' + + ' ? ("dark" as "dark" | "light")\n' + + ' : ("light" as "dark" | "light"),\n' + + ' semanticClass: "theme.rlabs",\n' + + ' semanticHighlighting: true,\n' + + ' colors: {\n' + + ' // # Integrated Terminal Colors\n' + + ' "terminal.background": colors.BG1,\n' + + ' "terminal.foreground": colors.FG1,\n' + + ' "terminal.border": colors.BORDER,\n' + + ' "terminal.ansiBrightBlack": ansiColors.BrightBlack,\n' + + ' "terminal.ansiBrightRed": ansiColors.BrightRed,\n' + + ' "terminal.ansiBrightGreen": ansiColors.BrightGreen,\n' + + ' "terminal.ansiBrightYellow": ansiColors.BrightYellow,\n' + + ' "terminal.ansiBrightBlue": ansiColors.BrightBlue,\n' + + ' "terminal.ansiBrightMagenta": ansiColors.BrightMagenta,\n' + + ' "terminal.ansiBrightCyan": ansiColors.BrightCyan,\n' + + ' "terminal.ansiBrightWhite": ansiColors.BrightWhite,\n' + + ' "terminal.ansiBlack": ansiColors.Black,\n' + + ' "terminal.ansiRed": ansiColors.Red,\n' + + ' "terminal.ansiGreen": ansiColors.Green,\n' + + ' "terminal.ansiYellow": ansiColors.Yellow,\n' + + ' "terminal.ansiBlue": ansiColors.Blue,\n' + + ' "terminal.ansiMagenta": ansiColors.Magenta,\n' + + ' "terminal.ansiCyan": ansiColors.Cyan,\n' + + ' "terminal.ansiWhite": ansiColors.White,\n' + + ' "terminal.selectionBackground": colors.selection,\n' + + ' }\n' + + ' };\n' + + '\n' + + ' return {\n' + + ' themeJSON: JSON.stringify(theme),\n' + + ' themeObject: theme\n' + + ' };\n' + + '}\n', 'javascript.js': '// Class definition\n' + @@ -757,8 +810,8 @@ const ThemePreview: React.FC = () => {

* This is a preview of the theme. The colors and tokens are not accurate - because of limitations of the monaco editor. The result in vscode will - be more granular and slightly different. + because of limitations in monaco editor. The result in vscode can be + more granular and slightly different.

) diff --git a/src/lib/generator/colorUtils.ts b/src/lib/generator/colorUtils.ts index 7400f62..4cf4072 100644 --- a/src/lib/generator/colorUtils.ts +++ b/src/lib/generator/colorUtils.ts @@ -223,6 +223,178 @@ export function generateSchemeColors( Math.abs(baseHue - angle + 360) % 360, ] break + case ColorScheme.SriYantra: + const angles: number[] = [] + for (let i = 1; i <= 9; i++) { + angles.push((baseHue + i * 20) % 360) + } + result = [baseHue, ...angles] + break + case ColorScheme.KabbalahTreeOfLife: + const values: number[] = [] + for (let i = 1; i <= 10; i++) { + values.push((baseHue + i * 15) % 360) + } + result = [baseHue, ...values] + break + case ColorScheme.Torus: + const u = degreesToRadians(baseHue % 360) + const v = degreesToRadians((baseHue * 2) % 360) + const R = 1 // Major radius + const r = 0.5 // Minor radius + const x = ((R + r * Math.cos(v)) * Math.cos(u)) % 360 + const y = ((R + r * Math.cos(v)) * Math.sin(u)) % 360 + const z = (r * Math.sin(v)) % 360 + result = [baseHue, x, y, z] + break + case ColorScheme.MandelbrotSet: + const c_re = Math.cos(degreesToRadians(baseHue)) + const c_im = Math.sin(degreesToRadians(baseHue)) + const maxIterations = 10 + let z_re = 0 + let z_im = 0 + const iterations: number[] = [] + for (let i = 0; i < maxIterations; i++) { + const z_re_new = z_re * z_re - z_im * z_im + c_re + const z_im_new = 2 * z_re * z_im + c_im + z_re = z_re_new + z_im = z_im_new + iterations.push(Math.sqrt(z_re * z_re + z_im * z_im) % 360) + if (z_re * z_re + z_im * z_im > 4) break + } + result = [baseHue, ...iterations] + break + case ColorScheme.SierpinskiTriangle: + const triangleIterations = 5 + const areas: number[] = [] + let area = baseHue + for (let i = 0; i < triangleIterations; i++) { + areas.push(area % 360) + area = area / 2 + } + result = [baseHue, ...areas] + break + // case ColorScheme.SierpinskiCarpet: + // result = [baseHue, ...sierpinskiCarpet(baseHue)] + // break + case ColorScheme.KochSnowflake: + const flakeIterations = 5 + const lengths: number[] = [] + let length = baseHue + for (let i = 0; i < flakeIterations; i++) { + lengths.push(length % 360) + length = length / 3 + } + result = [baseHue, ...lengths] + break + case ColorScheme.CelticKnot: + const knotAngles: number[] = [] + for (let i = 1; i <= 8; i++) { + const angle = (baseHue + i * 45) % 360 + knotAngles.push(angle) + } + result = [baseHue, ...knotAngles] + break + case ColorScheme.Labirinth: + const paths: number[] = [] + for (let i = 1; i <= 7; i++) { + paths.push((baseHue + i * 10) % 360) + } + result = [baseHue, ...paths] + break + case ColorScheme.YinYang: + const proportion = Math.abs(Math.sin(degreesToRadians(baseHue))) + result = [ + baseHue, + (proportion * 360) % 360, + ((1 - proportion) * 360) % 360, + ] + break + case ColorScheme.StarTetrahedron: + const starAngles: number[] = [] + for (let i = 0; i < 4; i++) { + starAngles.push((baseHue + i * 90) % 360) + } + result = [baseHue, ...starAngles] + break + case ColorScheme.Hamsa: + const hamsaLengths: number[] = [ + (baseHue * 0.5) % 360, + (baseHue * 0.6) % 360, + (baseHue * 0.7) % 360, + ] + result = [baseHue, ...hamsaLengths] + break + case ColorScheme.Enneagram: + const enneagramAngles: number[] = [] + for (let i = 0; i < 9; i++) { + enneagramAngles.push((baseHue + i * 40) % 360) + } + result = [baseHue, ...enneagramAngles] + break + case ColorScheme.Hexagram: + const hexagramAngles: number[] = [] + for (let i = 0; i < 6; i++) { + hexagramAngles.push((baseHue + i * 60) % 360) + } + result = [baseHue, ...hexagramAngles] + break + case ColorScheme.ChakraSymbols: + const chakraValues: number[] = [] + for (let i = 1; i <= 7; i++) { + chakraValues.push((baseHue + i * 30) % 360) + } + result = [baseHue, ...chakraValues] + break + case ColorScheme.SpiralDynamics: + const spiralValues: number[] = [] + for (let i = 1; i <= 6; i++) { + spiralValues.push((baseHue * Math.pow(1.5, i)) % 360) + } + result = [baseHue, ...spiralValues] + break + case ColorScheme.DoubleTorus: + const du = degreesToRadians(baseHue % 360) + const dv = degreesToRadians((baseHue * 2) % 360) + const R1 = 1 // Major radius of the first torus + const r1 = 0.5 // Minor radius of the first torus + const R2 = 1 // Major radius of the second torus + const r2 = 0.5 // Minor radius of the second torus + + // First torus coordinates + const x1 = ((R1 + r1 * Math.cos(dv)) * Math.cos(du)) % 360 + const y1 = ((R1 + r1 * Math.cos(dv)) * Math.sin(du)) % 360 + const z1 = (r1 * Math.sin(dv)) % 360 + + // Second torus coordinates (shifted) + const x2 = + ((R2 + r2 * Math.cos(dv + Math.PI)) * Math.cos(du + Math.PI)) % 360 + const y2 = + ((R2 + r2 * Math.cos(dv + Math.PI)) * Math.sin(du + Math.PI)) % 360 + const z2 = (r2 * Math.sin(dv + Math.PI)) % 360 + + result = [baseHue, x1, y1, z1, x2, y2, z2] + break + case ColorScheme.RosettePattern: + const k = ((baseHue % 360) / 360) * 10 + 2 // Number of petals between 2 and 12 + const points: number[] = [] + const numPoints = 10 + for (let i = 0; i < numPoints; i++) { + const theta = (2 * Math.PI * i) / numPoints + const r = Math.cos(k * theta) % 360 + points.push(r) + } + result = [baseHue, ...points] + break + case ColorScheme.NestedPolygons: + const sides = Math.floor((baseHue % 360) / 30) + 3 // Number of sides from 3 to 15 + const layers = 5 // Number of nested layers + const polygons: number[] = [] + for (let i = 1; i <= layers; i++) { + polygons.push((sides * i) % 360) + } + result = [baseHue, ...polygons] + break default: result = [baseHue] } @@ -397,3 +569,7 @@ export function adjustSaturation(saturation: number): number { export function adjustLightness(lightness: number): number { return Math.max(0, Math.min(100, lightness)) } +// Utility function to convert degrees to radians +function degreesToRadians(degrees: number): number { + return (degrees * Math.PI) / 180 +} diff --git a/src/lib/generator/export.ts b/src/lib/generator/export.ts index 8a2b88b..14a8426 100644 --- a/src/lib/generator/export.ts +++ b/src/lib/generator/export.ts @@ -979,62 +979,38 @@ export function generateSemanticThemeJSON( //-------------------------------------------------------------------- // ENTITIES //-------------------------------------------------------------------- - { - scope: ['entity.name.filename'], - settings: { - foreground: ansiColors.Yellow, - }, - }, - { - scope: ['entity.name.directive.restructuredtext'], - settings: { - foreground: ansiColors.Yellow, - fontStyle: 'italic', - }, - }, { scope: [ 'entity.name.class', 'entity.name.type.class', 'entity.other.inherited-class', - 'entity.name.fragment.graphql', - 'variable.fragment.graphql', ], settings: { foreground: colors.AC2, }, }, { - scope: ['entity.name.tag'], + scope: [ + 'entity.name.tag', + 'entity.other.attribute-name.parent-selector', + ], settings: { foreground: syntaxColors.tag, // fontStyle: "bold", }, }, { - scope: ['entity.other.attribute-name.parent-selector'], - settings: { - foreground: syntaxColors.tag, - }, - }, - { - scope: ['entity.other.attribute-name', 'meta.object-literal.key.js'], + scope: ['entity.other.attribute-name'], settings: { foreground: colors.AC2, - // fontStyle: "bold", }, }, { scope: [ 'entity.name.function', - 'meta.function-call.generic', - 'meta.function-call.object', - 'meta.function-call.php', - 'meta.function-call.static', - 'meta.method-call.java meta.method', - 'meta.method.groovy', - 'support.function.any-method.lua', - 'keyword.operator.function.infix', + 'meta.function-call', + 'meta.method-call', + 'meta.method', ], settings: { foreground: colors.AC1, @@ -1042,39 +1018,24 @@ export function generateSemanticThemeJSON( }, { scope: [ - // "source.css", - 'variable.parameter', - 'entity.name.variable.parameter', 'meta.selector.css', 'meta.at-rule.function variable', 'meta.at-rule.mixin variable', - 'meta.function.arguments variable.other.php', - 'meta.selectionset.graphql meta.arguments.graphql variable.arguments.graphql', + 'variable.parameter', + 'entity.name.variable.parameter', ], settings: { foreground: syntaxColors.parameter, }, }, - { - scope: ['entity.other.attribute-name.class.css'], - settings: { - foreground: colors.AC1, - }, - }, { scope: ['support'], settings: { foreground: syntaxColors.support, - // fontStyle: "bold", }, }, { - scope: [ - 'entity.name.function.target.makefile', - 'entity.name.section.toml', - 'entity.name.tag.yaml', - 'variable.other.key.toml', - ], + scope: ['entity.name', 'variable.other.key'], settings: { foreground: colors.AC1, }, @@ -1099,29 +1060,16 @@ export function generateSemanticThemeJSON( { scope: [ 'entity.other.attribute-name', - 'meta.object-literal.key.js', 'entity.other.attribute-name.pseudo-class.css', ], settings: { foreground: syntaxColors.attribute, - // fontStyle: "bold", }, }, - - //-------------------------------------------------------------------- - // TYPES - //-------------------------------------------------------------------- { - scope: [ - 'source.css support.type.property-name', - 'source.sass support.type.property-name', - 'source.scss support.type.property-name', - 'source.less support.type.property-name', - 'source.stylus support.type.property-name', - 'source.postcss support.type.property-name', - ], + scope: ['entity.other.attribute-name.class.css'], settings: { - foreground: colors.AC2, + foreground: colors.AC1, }, }, @@ -1130,26 +1078,7 @@ export function generateSemanticThemeJSON( //-------------------------------------------------------------------- { - scope: [ - 'keyword.primitive-datatypes.swift', - 'keyword.type.cs', - 'meta.protocol-list.objc', - 'meta.return-type.objc', - 'source.go storage.type', - 'source.groovy storage.type', - 'source.java storage.type', - 'source.powershell entity.other.attribute-name', - 'storage.class.std.rust', - 'storage.type.attribute.swift', - 'storage.type.c', - 'storage.type.core.rust', - 'storage.type.cs', - 'storage.type.groovy', - 'storage.type.objc', - 'storage.type.php', - 'storage.type.haskell', - 'storage.type.ocaml', - ], + scope: ['storage.class', 'storage.type'], settings: { foreground: colors.AC2, }, @@ -1160,19 +1089,6 @@ export function generateSemanticThemeJSON( foreground: syntaxColors.modifier, }, }, - { - scope: ['punctuation.definition.constant.restructuredtext'], - settings: { - foreground: syntaxColors.constant, - }, - }, - { - scope: ['storage.type.generic.java'], - settings: { - foreground: colors.AC1, - }, - }, - //-------------------------------------------------------------------- // COMMENTS //-------------------------------------------------------------------- @@ -1187,16 +1103,6 @@ export function generateSemanticThemeJSON( foreground: syntaxColors.comment, }, }, - { - scope: [ - 'comment keyword.codetag.notation', - 'comment.block.documentation keyword', - 'comment.block.documentation storage.type.class', - ], - settings: { - foreground: syntaxColors.keyword, - }, - }, //-------------------------------------------------------------------- // CONSTANTS @@ -1208,7 +1114,7 @@ export function generateSemanticThemeJSON( }, }, { - scope: ['constant.other.color', 'constant.other.key.perl'], + scope: ['constant.other.color'], settings: { foreground: syntaxColors.other, }, @@ -1231,38 +1137,10 @@ export function generateSemanticThemeJSON( foreground: syntaxColors.datetime, }, }, - { - scope: [ - 'constant.language.empty-list.haskell', - 'constant.other.symbol.hashkey', - 'constant.other.symbol.hashkey.ruby', - ], - settings: { - foreground: colors.FG2, - }, - }, //-------------------------------------------------------------------- // KEYWORDS //-------------------------------------------------------------------- - { - scope: [ - 'keyword.operator.other.powershell', - 'keyword.other.statement-separator.powershell', - ], - settings: { - foreground: syntaxColors.operator, - }, - }, - { - scope: [ - 'keyword.operator.dereference.java', - 'keyword.operator.navigation.groovy', - ], - settings: { - foreground: syntaxColors.operator, - }, - }, { scope: ['keyword.operator'], settings: { @@ -1286,7 +1164,7 @@ export function generateSemanticThemeJSON( }, }, { - scope: ['keyword.expressions-and-types.swift', 'keyword.other.this'], + scope: ['keyword.other.this'], settings: { foreground: syntaxColors.constant, }, @@ -1295,7 +1173,6 @@ export function generateSemanticThemeJSON( scope: ['keyword.control.import', 'keyword.control.from'], settings: { foreground: syntaxColors.controlImport, - //fontStyle: "bold" }, }, { @@ -1306,14 +1183,6 @@ export function generateSemanticThemeJSON( ], settings: { foreground: colors.AC2, - // fontStyle: "bold" - }, - }, - - { - scope: ['meta.attribute-selector.scss'], - settings: { - foreground: syntaxColors.selector, }, }, { @@ -1328,7 +1197,12 @@ export function generateSemanticThemeJSON( ], settings: { foreground: syntaxColors.controlFlow, - // fontStyle: "bold", + }, + }, + { + scope: ['meta.attribute-selector.scss'], + settings: { + foreground: syntaxColors.selector, }, }, { @@ -1340,7 +1214,6 @@ export function generateSemanticThemeJSON( ], settings: { foreground: syntaxColors.tag, - fontStyle: '', }, }, { @@ -1355,12 +1228,24 @@ export function generateSemanticThemeJSON( foreground: syntaxColors.tagPunctuation, }, }, + { + scope: [ + 'source.css support.type.property-name', + 'source.sass support.type.property-name', + 'source.scss support.type.property-name', + 'source.less support.type.property-name', + 'source.stylus support.type.property-name', + 'source.postcss support.type.property-name', + ], + settings: { + foreground: colors.AC2, + }, + }, { name: 'Constant property values in Stylesheets', scope: ['support.constant.property-value.css', 'constant.numeric.css'], settings: { foreground: colors.FG2, - fontStyle: '', }, }, { @@ -1388,18 +1273,6 @@ export function generateSemanticThemeJSON( foreground: syntaxColors.selector, }, }, - { - scope: [ - 'keyword.primitive-datatypes.swift', - 'keyword.type.cs', - 'meta.protocol-list.objc', - 'meta.return-type.objc', - 'source.powershell entity.other.attribute-name', - ], - settings: { - foreground: syntaxColors.attribute, - }, - }, //-------------------------------------------------------------------- // PONCTUATION @@ -1416,45 +1289,36 @@ export function generateSemanticThemeJSON( }, }, { - scope: [ - 'string.quoted.docstring.multi', - 'string.quoted.docstring.multi.python punctuation.definition.string.begin', - 'string.quoted.docstring.multi.python punctuation.definition.string.end', - 'string.quoted.docstring.multi.python constant.character.escape', - ], + scope: ['punctuation.definition.constant.restructuredtext'], settings: { - foreground: colors.AC1, + foreground: syntaxColors.constant, }, }, { - scope: [ - 'punctuation.definition.keyword.css', - 'punctuation.section.property-list.begin.bracket.curly.css', - 'punctuation.section.property-list.end.bracket.curly.css', - ], + scope: ['string.quoted.docstring.multi'], settings: { - foreground: syntaxColors.punctuation, - // fontStyle: "bold", + foreground: colors.AC1, }, }, { scope: [ + 'punctuation.definition.keyword.css', + 'punctuation.section.property-list.begin.bracket.curly.css', + 'punctuation.section.property-list.end.bracket.curly.css', 'punctuation.definition.attribute-selector.end.bracket.square.scss', 'punctuation.definition.attribute-selector.begin.bracket.square.scss', ], settings: { - foreground: colors.FG2, + foreground: syntaxColors.punctuation, }, }, { scope: [ 'punctuation', 'punctuation.definition.tag', - 'punctuation.separator.inheritance.php', 'punctuation.definition.tag.html', 'punctuation.definition.tag.begin.html', 'punctuation.definition.tag.end.html', - 'punctuation.section.embedded', ], settings: { foreground: syntaxColors.tagPunctuation, @@ -1462,31 +1326,14 @@ export function generateSemanticThemeJSON( }, { scope: [ - 'punctuation.definition.constant.ruby', - 'entity.other.attribute-name.placeholder punctuation', - 'entity.other.attribute-name.pseudo-class punctuation', - 'entity.other.attribute-name.pseudo-element punctuation', - 'meta.group.double.toml', + 'entity.other.attribute-name punctuation', 'meta.brace.square', 'meta.group.toml', - 'meta.object-binding-pattern-variable punctuation.destructuring', - 'punctuation.colon.graphql', + 'meta.group.double.toml', 'punctuation.definition.block.scalar.folded.yaml', 'punctuation.definition.block.scalar.literal.yaml', 'punctuation.definition.block.sequence.item.yaml', - 'punctuation.definition.entity.other.inherited-class', - 'punctuation.function.swift', - 'punctuation.separator.dictionary.key-value', - 'punctuation.separator.hash', - 'punctuation.separator.inheritance', - 'punctuation.separator.key-value', - 'punctuation.separator.key-value.mapping.yaml', - 'punctuation.separator.namespace', - 'punctuation.separator.pointer-access', - 'punctuation.separator.slice', - 'string.unquoted.heredoc punctuation.definition.string', - 'support.other.chomping-indicator.yaml', - 'punctuation.separator.annotation', + 'punctuation.separator', ], settings: { foreground: ansiColors.White, @@ -1500,13 +1347,10 @@ export function generateSemanticThemeJSON( 'punctuation.definition.arguments.end', 'punctuation.definition.entity.begin', 'punctuation.definition.entity.end', - 'punctuation.definition.tag.cs', 'punctuation.definition.type.begin', 'punctuation.definition.type.end', 'punctuation.section.scope.begin', 'punctuation.section.scope.end', - 'string.template meta.brace', - 'string.template punctuation.accessor', ], settings: { foreground: syntaxColors.punctuationBrace, @@ -1520,22 +1364,15 @@ export function generateSemanticThemeJSON( 'punctuation.definition.template-expression.begin', 'punctuation.definition.template-expression.end', 'punctuation.section.embedded.begin', - 'punctuation.section.embedded.coffee', 'punctuation.section.embedded.end', - 'punctuation.section.embedded.end source.php', - 'punctuation.section.embedded.end source.ruby', 'punctuation.definition.variable.makefile', ], settings: { foreground: syntaxColors.punctuationQuote, - // fontStyle: "bold", }, }, { scope: [ - 'meta.scope.for-loop.shell punctuation.definition.string.begin', - 'meta.scope.for-loop.shell punctuation.definition.string.end', - 'meta.scope.for-loop.shell string', 'punctuation.section.embedded.begin.tsx', 'punctuation.section.embedded.end.tsx', 'punctuation.section.embedded.begin.jsx', @@ -1552,18 +1389,12 @@ export function generateSemanticThemeJSON( foreground: syntaxColors.constant, }, }, - { - scope: ['punctuation.separator.inheritance.php'], - settings: { - foreground: syntaxColors.punctuation, - }, - }, //-------------------------------------------------------------------- // VARIABLES //-------------------------------------------------------------------- { - scope: ['variable', 'variable.other.readwrite'], + scope: ['variable'], settings: { foreground: syntaxColors.variable, }, @@ -1578,8 +1409,6 @@ export function generateSemanticThemeJSON( { scope: [ 'variable.language', - 'variable.language punctuation.definition.variable.php', - 'variable.other.readwrite.instance.ruby', 'variable.parameter.function.language.special', ], settings: { @@ -1587,58 +1416,28 @@ export function generateSemanticThemeJSON( }, }, { - scope: ['variable.other.object', 'meta.object-literal.key.ts'], - settings: { - foreground: syntaxColors.other, - // fontStyle: "bold", - }, - }, - { - scope: [ - 'variable.other.constant', - 'meta.import variable.other.readwrite', - 'meta.import variable.other.readwrite.alias', - 'meta.export variable.other.readwrite.alias', - 'meta.object-binding-pattern-variable variable.object.property', - 'meta.variable.assignment.destructured.object.coffee variable', - ], + scope: ['variable.other.constant'], settings: { foreground: syntaxColors.variableDeclaration, }, }, { - scope: ['meta.selectionset.graphql meta.arguments variable'], - settings: { - foreground: colors.AC2, - }, - }, - { - scope: ['variable.graphql', 'support.variable'], + scope: ['support.variable'], settings: { foreground: syntaxColors.variable, }, }, { scope: [ - 'variable.other.property.ts', - 'variable.other.property.js', 'variable.other.property', 'support.variable.property', - 'support.variable.property.js', 'variable.object.property', 'variable.other.object.property', - 'keyword.operation.graphql', ], settings: { foreground: syntaxColors.variableProperty, }, }, - { - scope: ['source.shell variable.other'], - settings: { - foreground: syntaxColors.constant, - }, - }, //-------------------------------------------------------------------- // FUNCTIONS @@ -1664,12 +1463,7 @@ export function generateSemanticThemeJSON( }, { - scope: [ - 'storage', - 'meta.implementation storage.type.objc', - 'meta.interface-or-protocol storage.type.objc', - 'source.groovy storage.type.def', - ], + scope: ['storage'], settings: { foreground: syntaxColors.storage, }, diff --git a/src/lib/generator/uiColors.ts b/src/lib/generator/uiColors.ts index d71ff5f..b4c09b5 100644 --- a/src/lib/generator/uiColors.ts +++ b/src/lib/generator/uiColors.ts @@ -24,7 +24,7 @@ export function generateThemeColors( const schemeHues = generateSchemeColors(baseHue, scheme) - const bgBase = isDark ? randomInteger(0, 7) : randomInteger(93, 100) + const bgBase = isDark ? randomInteger(0, 15) : randomInteger(85, 100) const fgBase = isDark ? randomInteger(85, 100) : randomInteger(0, 15) const generateColor = ( diff --git a/src/lib/types/colors.ts b/src/lib/types/colors.ts index 70a0e24..1f693b1 100644 --- a/src/lib/types/colors.ts +++ b/src/lib/types/colors.ts @@ -154,6 +154,24 @@ export enum ColorScheme { FareySequence, NobleNumbers, GoldenTriangle, + SriYantra, + KabbalahTreeOfLife, + Torus, + MandelbrotSet, + SierpinskiTriangle, + KochSnowflake, + CelticKnot, + Labirinth, + YinYang, + StarTetrahedron, + Hamsa, + Enneagram, + Hexagram, + ChakraSymbols, + SpiralDynamics, + DoubleTorus, + RosettePattern, + NestedPolygons, } export type ThemeGenerationOptions = {