Midnight Purple Theme
Publisher: Leon135Themes in package: 1
A fully dark VS Code theme with a focus on purple. Ideal for long coding sessions, because everything is fully black (midnight) ;)
A fully dark VS Code theme with a focus on purple. Ideal for long coding sessions, because everything is fully black (midnight) ;)
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 |
|---|---|---|
| comment, punctuation.definition.comment, string.comment | #8b949e | — |
| constant.other.placeholder, constant.character | #79c0ff | — |
| constant, entity.name.constant, variable.other.constant | #79c0ff | — |
| variable.language | #79c0ff | — |
| constant.numeric, constant.numeric.integer, constant.numeric.float, constant.numeric.hex, constant.numeric.octal, constant.numeric.binary | #79c0ff | — |
| constant.language, constant.language.boolean, constant.language.null, constant.language.undefined, constant.language.infinity, constant.language.nan | #79c0ff | — |
| variable.other.enummember, meta.enum variable.other.readwrite, entity.name.enum | #c084fc | — |
| entity.name.type, entity.name.class, entity.name.type.class, support.class, support.type | #ffa657 | — |
| entity.name.interface, entity.name.namespace | #a5d6ff | — |
| variable.parameter.function, variable.parameter | #ffab70 | — |
| entity.name.function | #d2a8ff | — |
| entity.name.tag | #7ee787 | — |
| support.class.component, entity.name.class.js, entity.name.class.ts | #ffa657 | — |
| entity.other.attribute-name, meta.tag.attributes | #79c0ff | — |
| keyword | #ff7b72 | — |
| keyword.operator, keyword.operator.arithmetic, keyword.operator.assignment, keyword.operator.comparison, keyword.operator.logical, keyword.operator.bitwise, keyword.operator.ternary, keyword.operator.spread, keyword.operator.optional, keyword.operator.type | #ff7b72 | — |
| keyword.operator.new, keyword.operator.delete, keyword.operator.typeof, keyword.operator.void, keyword.operator.instanceof, keyword.operator.in | #ff7b72 | — |
| storage, storage.type | #ff7b72 | — |
| storage.modifier.package, storage.modifier.import, storage.type.java, keyword.control.import, keyword.control.import.from, keyword.control.export, keyword.other.import, keyword.other.use | #e879f9 | — |
| meta.import variable.other.readwrite, meta.import variable.other, meta.import entity.name, meta.export variable.other.readwrite, meta.export variable.other, variable.other.readwrite.alias, meta.require variable.other.readwrite, source.python meta.statement.import variable, source.python meta.statement.from-import variable, source.python meta.statement.import entity.name, source.go entity.name.import, source.rust meta.use entity.name, source.java meta.import entity.name, source.kotlin meta.import entity.name, source.swift meta.import entity.name, source.cpp meta.include entity.name | #a5d6ff | — |
| support.other.module.python, entity.other.inherited-class.python, meta.path.python, support.type.python | #a5d6ff | — |
| meta.import.python variable.other, meta.import.python variable.other.python, meta.statement.import.python variable, meta.statement.from-import.python variable, meta.from-import.python variable.other | #a5d6ff | — |
| string, string punctuation.section.embedded source | #f0abfc | — |
| string.template, string.interpolated | #f0abfc | — |
| punctuation.definition.template-expression, punctuation.section.embedded | #ff7b72 | — |
| meta.jsx.children, meta.jsx.children.js, meta.tsx.children, text.html.basic, text.html meta.tag ~ text, meta.tag.inline ~ text, string.unquoted.html | #c8ccd4 | — |
| meta.property-name | #93c5fd | — |
| variable | #f2cc60 | — |
| variable.other | #f2cc60 | — |
| punctuation.separator, punctuation.terminator, punctuation.accessor, punctuation.definition.block, punctuation.definition.parameters.begin, punctuation.definition.parameters.end, punctuation.definition.array.begin, punctuation.definition.array.end, meta.brace.round, meta.brace.square, meta.brace.curly | #6e7681 | — |
| meta.decorator, punctuation.decorator, storage.type.annotation, entity.name.function.decorator, variable.other.decorator | #c084fc | — |
| meta.type.annotation, keyword.operator.type.annotation, punctuation.definition.typeparameters | #8b949e | — |
| meta.type.parameters entity.name.type, meta.type.parameters support.type | #93c5fd | — |
| source.css entity.other.attribute-name.class, source.css entity.other.attribute-name.id, source.css entity.name.tag, source.scss entity.other.attribute-name.class, source.less entity.other.attribute-name.class | #7ee787 | — |
| support.type.property-name.css, source.css support.type.vendored.property-name, meta.property-name.css | #79c0ff | — |
| support.constant.property-value.css, meta.property-value.css, support.constant.color, support.constant.font-name | #f0abfc | — |
| keyword.other.unit.css, keyword.other.unit.px, keyword.other.unit.em, keyword.other.unit.rem, keyword.other.unit.vh, keyword.other.unit.vw, keyword.other.unit.percent, constant.numeric.css | #79c0ff | — |
| entity.other.attribute-name.pseudo-class.css, entity.other.attribute-name.pseudo-element.css | #d2a8ff | — |
| support.type.property-name.json, meta.structure.dictionary.key.json string.quoted | #93c5fd | — |
| meta.import string, meta.export string, source.js string.quoted.module, source.ts string.quoted.module | #f0abfc | — |
| invalid.broken | #f85149 | italic |
| invalid.deprecated | #f85149 | italic |
| invalid.illegal | #f85149 | italic |
| invalid.unimplemented | #f85149 | italic |
| carriage-return | #0d1117 | italic underline |
| message.error | #f85149 | — |
| string variable | #f0abfc | — |
| source.regexp, string.regexp | #a5d6ff | — |
| string.regexp.character-class, string.regexp constant.character.escape, string.regexp source.ruby.embedded, string.regexp string.regexp.arbitrary-repitition | #a5d6ff | — |
| string.regexp constant.character.escape | #ffa657 | bold |
| support.constant | #79c0ff | — |
| support.variable | #79c0ff | — |
| support.type.property-name.json | #93c5fd | — |
| meta.module-reference | #79c0ff | — |
| punctuation.definition.list.begin.markdown | #ffa657 | — |
| markup.heading, markup.heading entity.name | #79c0ff | bold |
| markup.quote | #7ee787 | — |
| markup.italic | #c9d1d9 | italic |
| markup.bold | #c9d1d9 | bold |
| markup.underline | — | underline |
| markup.strikethrough | — | strikethrough |
| markup.inline.raw | #79c0ff | — |
| markup.deleted, meta.diff.header.from-file, punctuation.definition.deleted | #f85149 | — |
| punctuation.section.embedded | #ff7b72 | — |
| markup.inserted, meta.diff.header.to-file, punctuation.definition.inserted | #7ee787 | — |
| markup.changed, punctuation.definition.changed | #ffa657 | — |
| markup.ignored, markup.untracked | #222222 | — |
| meta.diff.range | #d2a8ff | bold |
| meta.diff.header | #79c0ff | — |
| meta.separator | #79c0ff | bold |
| meta.output | #79c0ff | — |
| brackethighlighter.tag, brackethighlighter.curly, brackethighlighter.round, brackethighlighter.square, brackethighlighter.angle, brackethighlighter.quote | #8b949e | — |
| brackethighlighter.unmatched | #f85149 | — |
| constant.other.reference.link, string.other.link | #a5d6ff | — |
| support.function, support.function.builtin, support.function.magic | #d2a8ff | — |
| variable.language.special.self.python, variable.language.special.cls.python, support.variable.magic.python, entity.name.function.magic.python, entity.name.variable.magic.python | #79c0ff | — |
| entity.name.lifetime.rust, storage.modifier.lifetime.rust, punctuation.definition.lifetime.rust | #a5d6ff | italic |
| variable.other.normal.shell, variable.other.bracket.shell, punctuation.definition.variable.shell | #f2cc60 | — |
| entity.name.tag.yaml, support.type.property-name.yaml, entity.other.attribute-name.yaml | #79c0ff | — |
| string.unquoted.plain.out.yaml, string.unquoted.plain.in.yaml, string.unquoted.block.yaml | #f0abfc | — |
| fenced_code.block.language, markup.fenced_code.block entity.name | #ff7b72 | — |
| markup.fenced_code.block, markup.raw.block | #c8ccd4 | — |
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}!`;
}