Chromatic
Publisher: cakerayThemes in package: 3
A trio of harmonious themes meant for all day use: Dawn, Dusk, and Eclipse.
A trio of harmonious themes meant for all day use: Dawn, Dusk, and Eclipse.
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 |
|---|---|---|
| accent | #0064C2 | — |
| beginning.punctuation | #256F73 | — |
| block.scope | #256F73 | — |
| comment | #636363 | italic |
| constant, constant.character, constant.keyword, constant.other | #256F73 | — |
| constant.language | #B3356B | italic |
| constant.numeric | #B3356B | — |
| control.elements | #256F73 | — |
| emphasis md | #6B50C5 | — |
| entity.global, entity.name.variable | #B3356B | — |
| entity.name, entity.other.alias | #6B50C5 | — |
| entity.name.type.ts | #83655D | — |
| entity.name.type, entity.name.type.cpp, entity.other.inherited-class | #83655D | — |
| entity.name.function.operator.cpp, entity.name.function.operator.member.cpp, entity.name.type.class.templated.cpp, entity.name.namespace.cpp | #0064C2 | — |
| entity.name.section, entity.other.attribute-name | #256F73 | — |
| function.brace | #256F73 | — |
| function.parameter | #8E5935 | — |
| import.storage.java | #B3356B | — |
| inline-color-decoration rgb-value | #B3356B | — |
| invalid, invalid.broken, invalid.deprecated, invalid.illegal, invalid.unimplemented | #B54848 | — |
| keyword, keyword.control, keyword.operator, keyword.other | #0064C2 | — |
| keyword.operator.expression, keyword.operator.new, keyword.operator.optional | #0064C2 | italic |
| keyword.other.documentation | #636363 | italic |
| keyword.other.unit | #256F73 | — |
| less rgb-value | #B3356B | — |
| markup | #256F73 | — |
| markup.changed.diff | #CC6633 | — |
| markup.deleted.diff | #B54848 | — |
| markup.heading.setext, markup.italic | #6B50C5 | — |
| markup.inserted.diff | #28A364 | — |
| markup.quote.markdown | #B3356B | — |
| meta.arguments, meta.property, meta.symbol | #83655D | — |
| meta.object-literal.key, meta.scope | #8E5935 | — |
| meta.body.function.definition.cpp, meta.definition.class, meta.definition.variable, meta.function-call, meta.interface, meta.method, meta.method.java, meta.method-call, meta.require, meta.selector | #256F73 | — |
| meta.function | #256F73 | — |
| meta.template | #B3356B | — |
| punctuation.bracket.angle, punctuation.section.angle-brackets | #83655D | — |
| punctuation.bracket, punctuation.definition, punctuation.operator, punctuation.parenthesis, punctuation.section, punctuation.separator, punctuation.terminator | #256F73 | — |
| punctuation.definition.directive | #0064C2 | — |
| punctuation.definition.comment | #636363 | italic |
| punctuation.definition.string | #B3356B | — |
| rgb-value | #256F73 | — |
| selector | #256F73 | — |
| source | #256F73 | — |
| source.json meta.structure.array.json > constant.language.json, source.json meta.structure.dictionary.json > constant.language.json | #B3356B | italic |
| source.json meta.structure.array.json > value.json > string.quoted.json, source.json meta.structure.dictionary.json > string.quoted.json, source.json meta.structure.dictionary.json > value.json > string.quoted.json | #B3356B | — |
| storage, storage.modifier, storage.type.function, storage.type.ts | #0064C2 | — |
| storage.type, support.type | #83655D | — |
| punctuation.definition.annotation, storage.type.annotation | #8E5935 | — |
| punctuation.definition.block.tag.jsdoc, storage.type.class.jsdoc, source.embedded.ts | #636363 | italic |
| string | #B3356B | — |
| string.quoted.docstring | #636363 | italic |
| support.class, support.function, support.module.node, support.other, support.token.decorator.python | #8E5935 | — |
| support.function.builtin.python | #6B50C5 | — |
| support.constant | #0064C2 | — |
| support.type.property-name, support.type.vendored.property-name.css | #256F73 | — |
| support.variable | #6B50C5 | — |
| text | #256F73 | — |
| todo | #CC6633 | — |
| token.debug-token | #8E5935 | — |
| token.error-token | #B54848 | — |
| token.info-token, token.storage | #0064C2 | — |
| token.package | #6B50C5 | — |
| token.variable | #256F73 | — |
| token.warn-token | #CC6633 | — |
| variable | #256F73 | — |
| variable.function, variable.other | #6B50C5 | — |
| variable.language | #0064C2 | italic |
| variable.other | #256F73 | — |
| variable.parameter | #256F73 | — |
| wikiword.xi | #0064C2 | — |
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}!`;
}