Knight Dark
Publisher: Santosh03GThemes in package: 2
A dark, brooding VS Code theme with animated elements. Rise from the shadows.
A dark, brooding VS Code theme with animated elements. Rise from the shadows.
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, comment.line, comment.block | #78909C | italic |
| string, string.quoted, string.template | #F48FB1 | — |
| constant.numeric, constant.language, constant.character | #FFAB40 | — |
| keyword, keyword.control, keyword.operator | #4FC3F7 | — |
| storage.type, storage.modifier | #4FC3F7 | bold |
| entity.name.function, support.function | #4DB6AC | — |
| entity.name.class, entity.name.type, support.class | #80DEEA | — |
| entity.name.tag, entity.name.tag.xml | #4FC3F7 | — |
| entity.other.attribute-name, entity.other.inherited-class | #FFAB40 | — |
| variable, variable.other | #B0BEC5 | — |
| variable.parameter, parameter | #FF8C00 | — |
| support.type, support.class.xml | #80DEEA | — |
| punctuation, punctuation.separator, punctuation.definition | #546E7A | — |
| meta.decorator, meta.annotation | #C9A84C | — |
| invalid, invalid.illegal | #EF5350 | underline |
| keyword.control.import, keyword.control.from | #4FC3F7 | — |
| meta.bracket | #546E7A | — |
| number | #FFAB40 | — |
| boolean | #FFAB40 | — |
| keyword.operator | #4FC3F7 | — |
| type, type.identifier | #80DEEA | — |
| interface, interface.name | #80DEEA | — |
| struct, struct.name | #80DEEA | — |
| enum, enum.name | #80DEEA | — |
| function, function.declaration | #4DB6AC | — |
| method, method.declaration | #4DB6AC | — |
| property, variable.object.property | #B0BEC5 | — |
| tag, meta.tag, meta.tag.any | #4FC3F7 | — |
| attribute.name, meta.attribute | #FFAB40 | — |
| attribute.value, string.attribute-value | #F48FB1 | — |
| delimiter, delimiter.html | #546E7A | — |
| metatag, metatag.xml | #C9A84C | — |
| keyword.other.unit | #FFAB40 | — |
| regexp, regular-expression | #F48FB1 | — |
| escape | #FFAB40 | — |
| embedded | #B0BEC5 | — |
| prolog, processing-instruction | #C9A84C | — |
| definition, definition.variable, definition.property | #B0BEC5 | — |
| source | #B0BEC5 | — |
| entity.name.namespace, namespace | #B0BEC5 | — |
| variable.other.constant, constant.other | #FFAB40 | — |
| variable.other.enummember | #FFAB40 | — |
| entity.name.decorator, decorator | #C9A84C | — |
| meta.export, meta.import | #4FC3F7 | — |
| string.interpolated, template literal | #F48FB1 | — |
| keyword.operator.logical, keyword.operator.bitwise | #4FC3F7 | — |
| keyword.operator.optional | #F48FB1 | — |
| comment.block.documentation, doccomment | #546E7A | italic |
| entity.name.label, label | #B0BEC5 | — |
| variable.language, this, super | #4FC3F7 | — |
| support.constant, support.variable | #80DEEA | — |
| markup.heading, heading, title | #FFD700 | bold |
| markup.bold, strong | — | bold |
| markup.italic, emphasis | — | italic |
| markup.underline, underline | — | underline |
| markup.raw, markup.inline.raw | #F48FB1 | — |
| markup.link, link | #4FC3F7 | — |
| markup.list, list | #4DB6AC | — |
| markup.quote, quote | #4DB6AC | italic |
| string.url, markup.link.url | #4FC3F7 | underline |
| variable.parameter.function, parameter.variable | #FF8C00 | — |
| storage, storage.type, storage.modifier, storage.class | #4FC3F7 | — |
| annotation, meta.annotation | #C9A84C | — |
| comment.line.double-dash, comment.line.number-sign, comment.line.double-slash | #78909C | italic |
| comment.block, comment.block.documentation | #78909C | italic |
| text.html | #B0BEC5 | — |
| text.xml | #B0BEC5 | — |
| text.md | #B0BEC5 | — |
| source.js, source.jsx, source.ts, source.tsx, source.js.jsx, source.tsx | #B0BEC5 | — |
| meta.jsx, JSXElement, JSXFragment | #4FC3F7 | — |
| JSXAttribute, meta.jsx.attributes | #FFAB40 | — |
| JSXAttribute.value, string.quoted.jsx | #F48FB1 | — |
| variable.other.object.js, variable.other.object.ts | #80DEEA | — |
| variable.language.import, variable.other.import | #4FC3F7 | — |
| support.class.js, support.class.ts | #80DEEA | — |
| entity.name.function.call.js, entity.name.function.call.ts | #4DB6AC | — |
| support.function.js, support.function.ts | #4DB6AC | — |
| constant.language.js, constant.language.ts | #F48FB1 | — |
| storage.type.js, storage.type.ts | #4DB6AC | — |
| variable.parameter.function.js, variable.parameter.function.ts | #FF8C00 | — |
| keyword.operator.new.js, keyword.operator.new.ts | #4FC3F7 | — |
| meta.tag.jsx, meta.tag.jsx.jsx | #4FC3F7 | — |
| punctuation.definition.tag.jsx | #4FC3F7 | — |
| source.python | #B0BEC5 | — |
| entity.name.function.python, support.function.python | #4DB6AC | — |
| entity.name.class.python, entity.name.type.python, support.class.python | #80DEEA | — |
| variable.parameter.function.python | #FF8C00 | — |
| variable.other.readwrite.python, variable.other.readonly.python | #B0BEC5 | — |
| constant.language.python | #F48FB1 | — |
| keyword.control.import.python, keyword.control.from.python | #4FC3F7 | — |
| storage.type.python, storage.modifier.python | #4DB6AC | bold |
| variable.language.python, variable.language.special | #4FC3F7 | — |
| entity.name.function.decorator.python, meta.function.decorator.python | #C9A84C | — |
| string.quoted.docstring, string.quoted.single.docstring, string.quoted.double.docstring | #546E7A | italic |
| meta.fstring.python, string.interpolated.python | #F48FB1 | — |
| support.type.python, support.typeException.python | #80DEEA | — |
| source.rust | #B0BEC5 | — |
| entity.name.function.rust, support.function.rust | #4DB6AC | — |
| entity.name.type.rust, support.type.rust | #80DEEA | — |
| entity.name.namespace.rust, module.rust | #FFD700 | — |
| variable.parameter.rust | #FF8C00 | — |
| keyword.other.rust, storage.type.rust | #4FC3F7 | — |
| keyword.control.rust | #4FC3F7 | — |
| keyword.operator.rust | #4FC3F7 | — |
| entity.name.lifetime.rust, storage.type.lifetime.rust | #C9A84C | — |
| entity.name.trait.rust | #80DEEA | bold |
| entity.name.impl.rust | #80DEEA | — |
| variable.other.rust | #B0BEC5 | — |
| constant.other.rust, constant.rust | #FFAB40 | — |
| source.go | #B0BEC5 | — |
| entity.name.function.go, support.function.go | #4DB6AC | — |
| entity.name.type.go, support.type.go | #80DEEA | — |
| variable.parameter.go | #FF8C00 | — |
| keyword.control.go, keyword.import.go | #4FC3F7 | — |
| keyword.operator.go | #4FC3F7 | — |
| support.constant.go, constant.go | #FFAB40 | — |
| variable.other.go | #B0BEC5 | — |
| storage.type.go | #4DB6AC | — |
| entity.name.package.go | #FFD700 | — |
| keyword.channel.go, keyword.operator.channel.go | #F48FB1 | — |
| source.java | #B0BEC5 | — |
| entity.name.function.java, support.function.java | #4DB6AC | — |
| entity.name.type.java, support.class.java | #80DEEA | — |
| variable.parameter.java | #FF8C00 | — |
| keyword.control.java | #4FC3F7 | — |
| storage.type.java | #4DB6AC | — |
| variable.other.object.java | #B0BEC5 | — |
| source.csharp | #B0BEC5 | — |
| entity.name.function.cs, support.function.cs | #4DB6AC | — |
| entity.name.type.cs, support.class.cs | #80DEEA | — |
| variable.parameter.cs | #FF8C00 | — |
| keyword.control.cs | #4FC3F7 | — |
| storage.type.cs | #4DB6AC | — |
| entity.name.namespace.cs | #FFD700 | — |
| keyword.operator.accessor.cs | #C9A84C | — |
| source.cpp | #B0BEC5 | — |
| entity.name.function.cpp, support.function.cpp | #4DB6AC | — |
| entity.name.type.cpp, support.type.cpp | #80DEEA | — |
| storage.type.cpp, storage.type.c | #4DB6AC | — |
| variable.parameter.cpp, variable.parameter.c | #FF8C00 | — |
| keyword.control.cpp, keyword.control.c | #4FC3F7 | — |
| keyword.operator.cpp | #4FC3F7 | — |
| meta.preprocessor.c, meta.preprocessor.cpp | #C9A84C | — |
| source.swift | #B0BEC5 | — |
| entity.name.function.swift, support.function.swift | #4DB6AC | — |
| entity.name.type.swift, support.type.swift | #80DEEA | — |
| variable.parameter.swift | #FF8C00 | — |
| keyword.control.swift | #4FC3F7 | — |
| storage.type.swift | #4DB6AC | — |
| keyword.other.swift | #4FC3F7 | — |
| source.kotlin | #B0BEC5 | — |
| entity.name.function.kotlin, support.function.kotlin | #4DB6AC | — |
| entity.name.type.kotlin, support.class.kotlin | #80DEEA | — |
| variable.parameter.kotlin | #FF8C00 | — |
| keyword.control.kotlin | #4FC3F7 | — |
| storage.type.kotlin | #4DB6AC | — |
| entity.name.decorator.kotlin, annotation.kotlin | #C9A84C | — |
| source.scss, source.css.scss | #B0BEC5 | — |
| source.less | #B0BEC5 | — |
| meta.property-name.scss, meta.property-name.css | #4DB6AC | — |
| meta.property-value.scss, meta.property-value.css | #F48FB1 | — |
| support.type.property-name.css, support.type.property-name.scss | #4DB6AC | — |
| support.constant.property-value.css, support.constant.property-value.scss | #FFAB40 | — |
| variable.css, variable.scss, variable.less | #B0BEC5 | — |
| entity.name.tag.css, entity.name.tag.scss, entity.name.tag.less | #4FC3F7 | — |
| source.json, source.json.comments | #B0BEC5 | — |
| string.key.json, support.type.property-name.json | #4DB6AC | — |
| string.value.json | #F48FB1 | — |
| constant.numeric.json | #FFAB40 | — |
| constant.language.json | #F48FB1 | — |
| source.yaml | #B0BEC5 | — |
| entity.name.tag.yaml, key.yaml | #4DB6AC | — |
| string.value.yaml, string.yaml | #F48FB1 | — |
| constant.numeric.yaml | #FFAB40 | — |
| keyword.yaml | #4FC3F7 | — |
| source.shell, source.bash, source.zsh, source.sh | #B0BEC5 | — |
| entity.name.function.shell, support.function.shell | #4DB6AC | — |
| variable.other.shell, variable.parameter.shell | #FF8C00 | — |
| keyword.control.shell | #4FC3F7 | — |
| string.quoted.shell | #F48FB1 | — |
| comment.line.number-sign.shell | #78909C | italic |
| source.sql | #B0BEC5 | — |
| entity.name.function.sql, support.function.sql | #4DB6AC | — |
| keyword.DML.sql, keyword.DDL.sql, keyword.control.sql | #4FC3F7 | — |
| keyword.operator.sql | #4FC3F7 | — |
| string.quoted.sql | #F48FB1 | — |
| constant.numeric.sql | #FFAB40 | — |
| entity.name.table.sql, entity.name.view.sql | #80DEEA | — |
| entity.name.column.sql | #B0BEC5 | — |
| source.graphql | #B0BEC5 | — |
| entity.name.type.graphql, named.operation.graphql | #80DEEA | — |
| entity.name.fragment.graphql | #4DB6AC | — |
| variable.graphql | #B0BEC5 | — |
| argument.variable.graphql | #FF8C00 | — |
| source.vue | #B0BEC5 | — |
| meta.tag.block.vue, meta.tag.inline.vue | #4FC3F7 | — |
| entity.other.attribute-name.vue | #FFAB40 | — |
| source.svelte | #B0BEC5 | — |
| source.lua | #B0BEC5 | — |
| entity.name.function.lua, support.function.lua | #4DB6AC | — |
| variable.lua | #B0BEC5 | — |
| keyword.control.lua | #4FC3F7 | — |
| source.php | #B0BEC5 | — |
| entity.name.function.php, support.function.php | #4DB6AC | — |
| variable.other.php | #B0BEC5 | — |
| storage.type.php | #4DB6AC | — |
| source.ruby | #B0BEC5 | — |
| entity.name.function.ruby, support.function.ruby | #4DB6AC | — |
| entity.name.type.ruby, support.class.ruby | #80DEEA | — |
| variable.ruby | #B0BEC5 | — |
| keyword.control.ruby | #4FC3F7 | — |
| source.elixir | #B0BEC5 | — |
| entity.name.function.elixir, support.function.elixir | #4DB6AC | — |
| entity.name.type.elixir, module.elixir | #80DEEA | — |
| variable.elixir | #B0BEC5 | — |
| source.dart | #B0BEC5 | — |
| entity.name.function.dart, support.function.dart | #4DB6AC | — |
| entity.name.type.dart, support.class.dart | #80DEEA | — |
| variable.parameter.dart | #FF8C00 | — |
| storage.type.dart | #4DB6AC | — |
| entity.name.decorator.dart | #C9A84C | — |
| source.toml | #B0BEC5 | — |
| meta.propertyName.toml, variable.other.key.toml | #4DB6AC | — |
| string.quoted.single.line.toml, string.unquoted.toml | #F48FB1 | — |
| constant.numeric.toml | #FFAB40 | — |
| constant.language.boolean.toml | #F48FB1 | — |
| markup.heading.1.md, markup.heading.1.markdown | #FFD700 | bold |
| markup.heading.2.md, markup.heading.2.markdown | #FFD700 | bold |
| markup.heading.3.md, markup.heading.3.markdown | #FFD700 | bold |
| markup.heading.4.md, markup.heading.4.markdown | #FFD700 | — |
| markup.heading.5.md, markup.heading.5.markdown | #FFD700 | — |
| markup.heading.6.md, markup.heading.6.markdown | #FFD700 | — |
| markup.list.unnumbered.markdown, markup.list.numbered.markdown | #4DB6AC | — |
| string.link.markdown, markup.underline.link.markdown | #4FC3F7 | underline |
| meta.separator.markdown | #546E7A | — |
| variable.footnote.markdown | #C9A84C | — |
| markup.raw.markdown, markup.raw.block.markdown | #F48FB1 | — |
| markup.bold.markdown, strong | #B0BEC5 | bold |
| markup.italic.markdown, emphasis | #B0BEC5 | italic |
| markup.strikethrough.markdown | #546E7A | strikethrough |
| source.diff | #B0BEC5 | — |
| meta.diff.header | #C9A84C | — |
| meta.diff.index, meta.diff.range | #4FC3F7 | — |
| punctuation.definition.quote.diff | #4DB6AC | — |
| source.dockerfile | #B0BEC5 | — |
| instruction.dockerfile, keyword.dockerfile | #4FC3F7 | — |
| string.dockerfile | #F48FB1 | — |
| variable.dockerfile | #FF8C00 | — |
| source.makefile | #B0BEC5 | — |
| entity.name.target.makefile, variable.other.makefile | #80DEEA | — |
| keyword.rule.makefile | #4FC3F7 | — |
| string.recipe.makefile | #F48FB1 | — |
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}!`;
}