Kray
Publisher: m2tklThemes in package: 1
Gray-based theme that is kind on the eyes for VS Code
Gray-based theme that is kind on the eyes for VS Code
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, comments | #a9a9aa | — |
| constant.other.placeholder, constant.character | #CF222E | — |
| constant, entity.name.constant, variable.other.constant, variable.other.enummember, variable.language, entity | #0550AE | — |
| entity.name | #437aed | bold |
| meta.export.default, meta.definition.variable | #953800 | — |
| variable.parameter.function, meta.jsx.children, meta.block, meta.tag.attributes, entity.name.constant, meta.object.member, meta.embedded.expression | #5d5d5f | — |
| string.quoted.docstring | #a9a9aa | — |
| string.quoted | #0da80a | — |
| entity.name.function | #437aed | bold |
| meta.function-call.generic | #437aed | bold |
| support.function.builtin | #586e75 | bold |
| entity.name.tag, support.class.component | #5d5d5f | — |
| keyword | #7c4def | bold |
| keyword.control.flow | #c838c6 | bold |
| storage, storage.type | #7c4def | bold |
| storage.modifier.package, storage.modifier.import, storage.type.java | #5d5d5f | — |
| string, string punctuation.section.embedded source | #0A3069 | — |
| support | #0550AE | — |
| meta.property-name | #0550AE | — |
| variable | #953800 | — |
| variable.other | #5d5d5f | — |
| invalid.broken | #82071E | italic |
| invalid.deprecated | #82071E | italic |
| invalid.illegal | #82071E | italic |
| invalid.unimplemented | #82071E | italic |
| carriage-return | #F6F8FA | italic underline |
| message.error | #82071E | — |
| string variable | #0550AE | — |
| source.regexp, string.regexp | #0A3069 | — |
| string.regexp.character-class, string.regexp constant.character.escape, string.regexp source.ruby.embedded, string.regexp string.regexp.arbitrary-repitition | #0A3069 | — |
| string.regexp constant.character.escape | #116329 | bold |
| support.constant | #0550AE | — |
| support.variable | #0550AE | — |
| support.type.property-name.json | #116329 | — |
| meta.module-reference | #0550AE | — |
| punctuation.definition.list.begin.markdown | #953800 | — |
| markup.heading, markup.heading entity.name | #0550AE | bold |
| markup.quote | #116329 | — |
| markup.italic | #5d5d5f | italic |
| markup.bold | #5d5d5f | bold |
| markup.underline | — | underline |
| markup.strikethrough | — | strikethrough |
| markup.inline.raw | #0550AE | — |
| markup.deleted, meta.diff.header.from-file, punctuation.definition.deleted | #82071E | — |
| punctuation.section.embedded | #CF222E | — |
| markup.inserted, meta.diff.header.to-file, punctuation.definition.inserted | #116329 | — |
| markup.changed, punctuation.definition.changed | #953800 | — |
| markup.ignored, markup.untracked | #EAEEF2 | — |
| meta.diff.range | #8250DF | bold |
| meta.diff.header | #0550AE | — |
| meta.separator | #0550AE | bold |
| meta.output | #0550AE | — |
| brackethighlighter.tag, brackethighlighter.curly, brackethighlighter.round, brackethighlighter.square, brackethighlighter.angle, brackethighlighter.quote | #57606A | — |
| brackethighlighter.unmatched | #82071E | — |
| constant.other.reference.link, string.other.link | #0A3069 | — |
| token.info-token | #316BCD | — |
| token.warn-token | #CD9731 | — |
| token.error-token | #CD3131 | — |
| token.debug-token | #800080 | — |
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}!`;
}