diff --git a/src/color.ts b/src/color.ts index 61ad505..298ba03 100644 --- a/src/color.ts +++ b/src/color.ts @@ -58,6 +58,7 @@ export function generateFallbackColorSet(s: IBaseColorSet, type: 'light' | 'dark number: s.color4, storage: s.color1, string: s.color2, + stringEscape: (type === 'light' ? darken : lighten)(s.color2, 0.5), comment: (type === 'light' ? darken : lighten)(s.background, 2.0), class: s.color3, classMember: s.color3, diff --git a/src/interfaces.ts b/src/interfaces.ts index b7186e6..e0f7d51 100644 --- a/src/interfaces.ts +++ b/src/interfaces.ts @@ -25,6 +25,7 @@ export interface IColorSet { number?: string; storage?: string; string?: string; + stringEscape?: string; comment?: string; class?: string; classMember?: string; diff --git a/src/rules.ts b/src/rules.ts index 4a2e3bc..31bd315 100644 --- a/src/rules.ts +++ b/src/rules.ts @@ -71,6 +71,7 @@ export const tokenRules: IRuleGenerator[] = [ // string: It's important that string is put first so that other scopes can override strings // within template expressions { color: s => s.syntax.string, generate: getSimpleColorGenerator('String', 'string') }, + { color: s => s.syntax.stringEscape, generate: getSimpleColorGenerator('String Escape', 'constant.character.escape, text.html constant.character.entity.named, punctuation.definition.entity.html') }, { color: s => s.syntax.boolean, generate: getSimpleColorGenerator('Boolean', 'constant.language.boolean') }, { color: s => s.syntax.number, generate: getSimpleColorGenerator('Number', 'constant.numeric') }, { color: s => s.syntax.identifier, generate: getSimpleColorGenerator('Identifier', 'variable, support.variable, support.class, support.constant, meta.definition.variable entity.name.function') },