Moonlight VSCode Theme 🌌
Publisher: v-amorimThemes in package: 1
Journey into the night with Moonlight 🌌, a dark and serene theme for VS Code, enhancing readability and reducing eye strain.
Journey into the night with Moonlight 🌌, a dark and serene theme for VS Code, enhancing readability and reducing eye strain.
Full workbench mockup using this variant's colors and tokenColors.
Loading...
Workbench UI color keys from the theme JSON colors map.
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| entity.name.command, entity.name.command.shell, entity.name.function, entity.name.function.ahk, entity.name.function.label.ahk, entity.name.function.powershell, entity.name.function.python, entity.name.function.ruby, entity.name.function.shell, entity.name.function.target.makefile, entity.name.section.group-title, entity.name.section.group-title.ini, entity.name.section.markdown, entity.name.type, entity.name.type.class, entity.name.type.class.python, entity.name.type.js, entity.name.type.struct, entity.name.type.struct.rust, entity.name.type.ts, entity.other.inherited-class, entity.other.inherited-class.python, hotkeyline, hotkeyline.ahk, keyword.operator.error-control, keyword.operator.error-control.php, keyword.other.DML, keyword.other.DML.II, keyword.other.DML.II.sql, keyword.other.DML.sql, keyword.other.alias, keyword.other.alias.sql, keyword.other.phpdoc, keyword.other.phpdoc.php, markup.bold, markup.inline.raw, markup.raw.block, markup.raw.block.markdown, meta.diff.header, meta.diff.range, meta.interpolation, meta.interpolation.rust, meta.item-access.arguments, meta.item-access.arguments.python, meta.module-reference, meta.output, meta.property-name, meta.separator, meta.table, meta.table.toml, punctuation.definition.block.sequence.item, punctuation.definition.block.sequence.item.yaml, punctuation.definition.constant, punctuation.definition.constant.css, punctuation.definition.decorator, punctuation.definition.decorator.python, punctuation.definition.subshell.single.shell, punctuation.definition.table.markdown, punctuation.definition.variable, punctuation.definition.variable.makefile, punctuation.definition.variable.ruby, punctuation.section.embedded.begin, punctuation.section.embedded.begin.php, storage.type.format, storage.type.format.python, storage.type.imaginary.number, storage.type.imaginary.number.python, storage.type.number, storage.type.number.python, string variable, support.constant, support.function.any-method, support.function.any-method.lua, support.function.attribute, support.function.attribute.powershell, support.function.calc, support.function.calc.css, support.function.magic, support.function.magic.python, support.function.powershell, support.function.string.sql, support.type, support.type.exception, support.type.exception.python, support.type.property-name.css, support.type.python, support.variable, variable.other.class, variable.other.class.js, variable.other.class.ts, variable.other.readwrite.alias, variable.other.readwrite.alias.ts, variable.other.readwrite.instance, variable.other.readwrite.instance.ruby | — | bold |
| constant.other.database-name, constant.other.database-name.sql, constant.other.option, entity.name.tag.yaml, keyword.other.definition.ini, markup.italic, meta.function-call.arguments, meta.function-call.arguments.python, meta.indexed-name, meta.indexed-name.python, meta.lambda-function, meta.lambda-function.python, storage.type.string, storage.type.string.python, string.quoted.docstring.raw.multi, string.quoted.docstring.raw.multi.python, string.quoted.docstring.raw.single, string.quoted.docstring.raw.single.python, support.type.property-name.toml, variable.css, variable.other.makefile, variable.parameter, variable.parameter.js, variable.parameter.ts | — | italic |
| constant.language.undefined, constant.language.undefined.js, constant.language.undefined.ts, entity.name.variable.parameter, entity.name.variable.parameter.cs, entity.other.attribute-name, entity.other.attribute-name.html, entity.other.inherited-class variable.parameter.class, entity.other.inherited-class.python variable.parameter.class, entity.other.inherited-class.python variable.parameter.class.python, markup.bold markup.italic, markup.italic markup.bold, meta.class.inheritance, meta.class.inheritance.python, meta.hashtable.assignment, punctuation.definition.variable, punctuation.definition.variable.powershell, support.variable.automatic, support.variable.automatic.powershell, support.variable.magic, support.variable.magic.python, variable.argument, variable.argument.css, variable.language.self, variable.language.special.cls, variable.language.special.cls.python, variable.language.special.self, variable.language.special.self.python, variable.parameter.attribute, variable.parameter.attribute.powershell, variable.parameter.function.language, variable.parameter.function.language.python, variable.parameter.function.language.special.cls, variable.parameter.function.language.special.cls.python, variable.parameter.function.language.special.self, variable.parameter.function.language.special.self.python, variable.parameter.probably.c | — | bold italic |
| constant.other.reference.link, markup.underline, markup.underline.link, markup.underline.link.latex, string.other.link.title, string.other.link.title.markdown | — | underline |
| invalid.broken, invalid.deprecated, invalid.illegal, invalid.unimplemented, keyword.illegal.name, keyword.illegal.name.python | — | italic underline |
| markup.strikethrough | — | strikethrough |
| brackethighlighter.angle, brackethighlighter.curly, brackethighlighter.quote, brackethighlighter.round, brackethighlighter.square, brackethighlighter.tag, comment, entity.name.function.preprocessor.c, fenced_code.block.language, punctuation.definition.comment, punctuation.definition.tag.xml, string.comment | #aea4bf | — |
| comment.typehint.directive.notation, comment.typehint.directive.notation.python, comment.typehint.punctuation.notation, comment.typehint.punctuation.notation.python, entity.name.tag.css, entity.name.type.qss, punctuation.ahk, punctuation.comma.rust, punctuation.other.comma, punctuation.separator, punctuation.separator.annotation.result, punctuation.separator.annotation.result.python, punctuation.separator.arguments, punctuation.separator.arguments.python, punctuation.separator.continuation.line, punctuation.separator.continuation.line.python, punctuation.separator.element, punctuation.separator.element.python, punctuation.separator.key-value, punctuation.separator.key-value.markdown, punctuation.separator.object, punctuation.separator.object.ruby, punctuation.separator.parameters, punctuation.separator.parameters.python, punctuation.separator.slice, punctuation.separator.slice.python | #cdcfe7 | — |
| entity.name.function, entity.name.function.ahk, entity.name.function.label.ahk, entity.name.function.powershell, entity.name.function.python, entity.name.function.ruby, entity.name.function.shell, entity.name.type, entity.name.type.alias, entity.name.type.alias.ts, entity.name.type.class, entity.name.type.class.python, entity.name.type.js, entity.name.type.struct, entity.name.type.struct.rust, entity.name.type.ts, keyword.operator.error-control, keyword.operator.error-control.php, keyword.operator.macro.dollar, keyword.other.phpdoc, keyword.other.phpdoc.php, keyword.other.unit.suffix, markup.inline.raw, markup.raw.block.markdown, meta.diff.header, meta.interpolation, meta.interpolation.rust, meta.item-access.arguments, meta.item-access.arguments.python, meta.module-reference, meta.output, meta.property-name, punctuation.definition.block.sequence.item, punctuation.definition.block.sequence.item.yaml, punctuation.definition.constant, punctuation.definition.constant.css, punctuation.definition.subshell.single, punctuation.definition.subshell.single.shell, punctuation.definition.table.markdown, punctuation.definition.variable, punctuation.definition.variable.makefile, punctuation.definition.variable.php, punctuation.definition.variable.powershell, punctuation.definition.variable.ruby, storage.type.format, storage.type.format.python, storage.type.function, storage.type.function.js, storage.type.function.ts, storage.type.imaginary.number, storage.type.imaginary.number.python, storage.type.number, storage.type.number.python, string variable, support.constant, support.function.string.sql, support.type.property-name, support.type.property-name.css, support.variable, variable.other.readwrite.instance, variable.other.readwrite.instance.ruby | #b0b9e5 | — |
| markup.quote.markdown, punctuation.definition.italic.markdown | #acb9e6 | — |
| entity.name.class, entity.name.class.lua, entity.name.tag, entity.name.tag.html, entity.other.attribute-name, entity.other.attribute-name.class.css, entity.other.attribute-name.localname.xml, entity.other.attribute-name.xml, keyword.operator.address, keyword.operator.address.go, keyword.type, markup.heading, meta.attribute, meta.attribute.python, meta.function-call, meta.function-call.ts, meta.function.decorator, meta.function.decorator.python, meta.method.body, meta.method.body.java, meta.selector, meta.selector.css, meta.template-tag.end, meta.template-tag.start, punctuation.bracket.angle, punctuation.bracket.angle.java, variable.other.metavariable.specifier, variable.other.property, variable.other.property.js, variable.other.property.ts | #9cb6ed | — |
| keyword.other.sql, meta.indexed-name, meta.indexed-name.python, variable.other.member, variable.other.member.powershell | #97b7fa | — |
| meta.group, meta.group.batchfile, meta.scope.recipe.makefile, source.ini, source.makefile, source.regexp, string punctuation.section.embedded source, string punctuation.section.embedded, string, string.interpolated, string.interpolated.python, string.other.link.description.markdown, string.other.link.description.title.markdown, string.quoted, string.quoted.docstring, string.quoted.docstring.multi, string.quoted.docstring.multi.python, string.quoted.docstring.raw.multi, string.quoted.docstring.raw.multi.python, string.quoted.docstring.raw.single, string.quoted.docstring.raw.single.python, string.quoted.docstring.single, string.quoted.docstring.single.python, string.quoted.double, string.quoted.double.python, string.quoted.single, string.quoted.single.python, string.regexp constant.character.escape, string.regexp source.ruby.embedded, string.regexp string.regexp.arbitrary-repitition, string.regexp, string.regexp.character-class, support.constant.color.w3c-standard-color-name, support.constant.color.w3c-standard-color-name.css | #a5cfff | — |
| keyword.other.order.sql, meta.jsx.children, meta.member.access, meta.member.access.python, support.type.property-name, support.type.property-name.json, support.type.property-name.qss, variable.other.member, variable.other.member.c, variable.other.object.property, variable.other.object.property.cs | #78a1fa | — |
| entity.name.command.shell, entity.name.function.target.makefile, entity.name.label.js, entity.name.section.group-title.ini, entity.other.inherited-class, entity.other.inherited-class, entity.other.inherited-class.python, hotkeyline.ahk, keyword.operator.namespace, keyword.operator.namespace.rust, keyword.other.DML, keyword.other.DML.II.sql, keyword.other.DML.sql, keyword.other.alias.sql, markup.underline.link, markup.underline.link, markup.underline.link.latex, meta.table.toml, punctuation.section.embedded.begin.php, punctuation.separator.namespace.ruby, punctuation.separator.scope-resolution, string.other.link.title, string.other.link.title, string.other.link.title.markdown, support.function, support.function.attribute.powershell, support.function.calc.css, support.function.lua, support.function.powershell, support.type, support.type, support.type.exception, support.type.exception, support.type.exception.python, support.type.python, variable.other.class, variable.other.class.js, variable.other.class.ts, variable.other.readwrite.alias, variable.other.readwrite.alias.ts | #7386d0 | — |
| constant.numeric, constant.other.color.rgb-value.hex, constant.other.color.rgb-value.hex.css, entity.name.constant, entity.other.keyframe-offset.percentage, entity.other.keyframe-offset.percentage.css, keyword.other.DDL.create.II, keyword.other.DDL.create.II.sql, punctuation.separator.dot.decimal | #79b8ff | — |
| entity.name.section.markdown, meta.separator, support.function.magic, support.function.magic, support.function.magic.python, support.variable.automatic.powershell, support.variable.magic, support.variable.magic, support.variable.magic.python, variable.language.self, variable.language.special.cls, variable.language.special.cls, variable.language.special.cls.python, variable.language.special.self, variable.language.special.self, variable.language.special.self.python, variable.parameter.function.language.special.cls, variable.parameter.function.language.special.cls, variable.parameter.function.language.special.cls.python, variable.parameter.function.language.special.self, variable.parameter.function.language.special.self, variable.parameter.function.language.special.self.python | #79c0ff | — |
| markup.inserted, meta.diff.header.to-file, punctuation.definition.inserted | #49ef95 | — |
| markup.changed, punctuation.definition.changed | #f2b199 | — |
| constant.language.undefined.js, constant.language.undefined.ts, entity.name.variable.parameter.cs, entity.other.attribute-name.html, entity.other.inherited-class.python variable.parameter.class, entity.other.inherited-class.python variable.parameter.class.python, keyword.other.pgsql, meta.class.inheritance, meta.class.inheritance.python, meta.function-call.c, meta.function.definition.rust, meta.function.parameters, meta.function.parameters.python, meta.hashtable.assignment, meta.object.member.js, meta.object.member.ts, string.unquoted.argument.shell, variable.argument.css, variable.other.object.access.c, variable.parameter, variable.parameter.attribute.powershell, variable.parameter.cpp, variable.parameter.function, variable.parameter.function, variable.parameter.function.language, variable.parameter.function.language.python, variable.parameter.function.ruby, variable.parameter.go, variable.parameter.java, variable.parameter.probably.c | #ffafaf | — |
| brackethighlighter.unmatched, comment.typehint.ignore.notation, comment.typehint.ignore.notation.python, comment.typehint.variable.notation, comment.typehint.variable.notation.python, constant.other.ellipsis, constant.other.ellipsis.python, constant.other.option.dash.shell, invalid.broken, invalid.deprecated, invalid.illegal, invalid.unimplemented, keyword, keyword.control.flow, keyword.control.flow.python, keyword.control.import, keyword.control.import.python, keyword.illegal.name, keyword.illegal.name.python, keyword.operator, keyword.operator.arithmetic, keyword.operator.arithmetic.python, keyword.operator.assignment, keyword.operator.assignment.python, keyword.operator.bitwise, keyword.operator.bitwise.python, keyword.operator.comparison, keyword.operator.comparison.python, keyword.operator.logical, keyword.operator.logical.python, keyword.operator.unpacking.arguments, keyword.operator.unpacking.arguments.python, markup.deleted, message.error, meta.diff.header.from-file, meta.selector.qss, meta.tag.xml, punctuation.accessor, punctuation.accessor.js, punctuation.accessor.ts, punctuation.definition.constant.hashkey.ruby, punctuation.definition.deleted, punctuation.eq.toml, punctuation.other.colon, punctuation.other.period, punctuation.section.class.begin, punctuation.section.class.begin.python, punctuation.section.embedded, punctuation.section.function.begin, punctuation.section.function.begin.python, punctuation.section.function.end, punctuation.section.function.end.python, punctuation.section.function.lambda.begin, punctuation.section.function.lambda.begin.python, punctuation.section.function.lambda.end, punctuation.section.function.lambda.end.python, punctuation.separator.colon, punctuation.separator.colon.python, punctuation.separator.dict, punctuation.separator.dict.python, punctuation.separator.dot-access, punctuation.separator.java, punctuation.separator.key-value.css, punctuation.separator.key-value.html, punctuation.separator.key-value.ini, punctuation.separator.key-value.js, punctuation.separator.key-value.makefile, punctuation.separator.key-value.mapping.yaml, punctuation.separator.key-value.ts, punctuation.separator.label.js, punctuation.separator.method.ruby, punctuation.separator.namespace.xml, punctuation.separator.period, punctuation.separator.period.python, punctuation.separator.variable.ruby, storage, storage.modifier.declaration, storage.modifier.declaration.python, storage.type.class, storage.type.class.python, storage.type.function, storage.type.function.lambda, storage.type.function.lambda.python, storage.type.function, storage.type.function.js, storage.type.function.ts, storage.type.function.python, support.function.be.latex, support.function.builtin.shell | #ca5f71 | — |
| storage.type.string.python | #ff6bab | — |
| constant.other.caps, constant.other.caps.python | #f279b2 | — |
| entity.other.inherited-class, support.constant.property-value.css, support.constant.property-value.qss, variable.other.block.ruby, variable.parameter.function-call, variable.parameter.function-call.python | #ff98ba | — |
| constant.character.escape, constant.character.escape, constant.character.escape.markdown, constant.character.escape.python, punctuation.definition.markdown, punctuation.definition.string.begin, punctuation.definition.string.begin.python string.interpolated, punctuation.definition.string.begin.python string.interpolated.python, punctuation.definition.string.begin.python string.quoted.double, punctuation.definition.string.begin.python string.quoted.double.python, punctuation.definition.string.begin.python string.quoted.multi, punctuation.definition.string.begin.python string.quoted.multi.python, punctuation.definition.string.begin.python string.quoted.raw.single, punctuation.definition.string.begin.python string.quoted.raw.single.python, punctuation.definition.string.begin.python string.quoted.single, punctuation.definition.string.begin.python string.quoted.single.python, punctuation.definition.string.end, punctuation.definition.string.end.python string.interpolated, punctuation.definition.string.end.python string.interpolated.python, punctuation.definition.string.end.python string.quoted.double, punctuation.definition.string.end.python string.quoted.double.python, punctuation.definition.string.end.python string.quoted.multi, punctuation.definition.string.end.python string.quoted.multi.python, punctuation.definition.string.end.python string.quoted.raw.single, punctuation.definition.string.end.python string.quoted.raw.single.python, punctuation.definition.string.end.python string.quoted.single, punctuation.definition.string.end.python string.quoted.single.python, punctuation.definition.string.rust | #faa4c9 | — |
| constant.other.reference.link, entity.name.namespace, entity.other.attribute-name.namespace, entity.other.attribute-name.namespace.xml, punctuation.definition.variable.percent, punctuation.definition.variable.percent.ahk, storage.modifier.import, storage.modifier.package, string.unquoted.html, support.function.general.tex, variable.language.this, variable.language.this.js, variable.language.this.ts, variable.other.object.property, variable.other.object.property.js, variable.other.object.property.ts | #fdbaf2 | — |
| meta.function-call.arguments, meta.function-call.arguments.python, variable.css | #f8eaf8 | — |
| constant.other.table-name.sql, entity.name.scope-resolution, entity.name.scope-resolution.cpp, entity.name.scope-resolution.parameter.cpp, entity.name.scope-resolution.template.call, entity.name.tag.localname.xml, support.class.ruby, support.function.general.latex, support.function.kernel.ruby, support.function.url.latex | #b58ee8 | — |
| comment.typehint.type.notation, comment.typehint.type.notation.python, entity.name.function, entity.name.function.js, entity.name.function.ts, fenced_code.block.language.attributes.markdown, keyword.other.type, keyword.other.type.php, meta.diff.range, meta.function-call.generic, meta.function-call.generic.python, meta.other.valid-ampersand.markdown, meta.other.valid-bracket.markdown, punctuation.definition.bold.markdown, punctuation.definition.heading, punctuation.definition.link.description.begin.markdown, punctuation.definition.list.begin.markdown, punctuation.definition.list.end.markdown, punctuation.definition.quote.begin.markdown, punctuation.definition.raw.markdown, punctuation.definition.strikethrough.markdown, punctuation.definition.tag.begin.html, punctuation.definition.tag.end.html, punctuation.definition.typeparameters.begin, punctuation.definition.typeparameters.begin.cs, punctuation.definition.typeparameters.begin.ts, punctuation.definition.typeparameters.end, punctuation.definition.typeparameters.end.cs, punctuation.definition.typeparameters.end.ts, punctuation.section.angle-brackets, punctuation.semi.rust, punctuation.separator.dictionary.key-value.json, punctuation.separator.pointer-access.c, punctuation.separator.semicolon, punctuation.separator.semicolon.python, punctuation.separator.table.markdown, punctuation.support.type.property-name.begin, punctuation.support.type.property-name.begin.json, punctuation.support.type.property-name.end, punctuation.support.type.property-name.end.json, punctuation.terminator, punctuation.terminator.java, punctuation.terminator.rule.css, punctuation.terminator.statement.js, punctuation.terminator.statement.ts, storage.type, storage.type.java, storage.type.php, storage.type.primitive.java, support.function.ahk, support.function.any-method.lua, support.function.builtin, support.function.builtin.python, support.function.misc.css, variable.legacy.builtin, variable.legacy.builtin.python, variable.other.object.property.java | #a5a1e9 | — |
| constant.other.database-name, constant.other.database-name.sql, constant.other.option, entity.name.tag, entity.name.tag.yaml, keyword.other.definition, keyword.other.definition.ini, support.type.property-name, support.type.property-name.toml, variable.other.makefile, variable.parameter, variable.parameter.js, variable.parameter.ts | #d388f0 | — |
| constant.character.format.placeholder.other, constant.character.format.placeholder.other.python, constant.language, constant.language.ahk, constant.language.boolean, constant.language.boolean.false.js, constant.language.boolean.false.ts, constant.language.boolean.ruby, constant.language.boolean.toml, constant.language.boolean.true.js, constant.language.boolean.true.ts, constant.language.boolean.yaml, constant.language.json, constant.language.powershell, constant.language.python, constant.language.symbol.hashkey.ruby, constant.language.symbol.ruby, constant.other, entity.name.tag, entity.name.variable.event, entity.name.variable.event.cs, punctuation.definition.interpolation, punctuation.definition.interpolation.rust, support.class.component, variable.other.constant, variable.other.enummember | #e08adb | — |
export interface User {
id: string;
name: string;
role: "admin" | "member";
tags: string[];
}
/**
* Fetch user data by ID
* @param id
* @returns User object or null if ID is invalid
*/
export async function fetchUser(id: string): Promise<User | null> {
if (!id) {
return null;
}
const response = await fetch(`/api/users/${id}`, {
method: "GET",
headers: { Accept: "application/json" },
});
if (!response.ok) {
throw new Error(`HTTP ${response.status}`);
}
return (await response.json()) as User;
}
function greet(user: User): string {
// Simple greeting function that uses the user's name
return `Hello, ${user.name}!`;
}