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 | #84AFE0 | — |
| beginning.punctuation | #88B8C0 | — |
| block.scope | #88B8C0 | — |
| comment | #B3B3B3 | italic |
| constant, constant.character, constant.keyword, constant.other | #88B8C0 | — |
| constant.language | #D79DAC | italic |
| constant.numeric | #D79DAC | — |
| control.elements | #88B8C0 | — |
| emphasis md | #B6A6E0 | — |
| entity.global, entity.name.variable | #D79DAC | — |
| entity.name, entity.other.alias | #B6A6E0 | — |
| entity.name.type.ts | #B29F86 | — |
| entity.name.type, entity.name.type.cpp, entity.other.inherited-class | #B29F86 | — |
| entity.name.function.operator.cpp, entity.name.function.operator.member.cpp, entity.name.type.class.templated.cpp, entity.name.namespace.cpp | #84AFE0 | — |
| entity.name.section, entity.other.attribute-name | #88B8C0 | — |
| function.brace | #88B8C0 | — |
| function.parameter | #CBA477 | — |
| import.storage.java | #D79DAC | — |
| inline-color-decoration rgb-value | #D79DAC | — |
| invalid, invalid.broken, invalid.deprecated, invalid.illegal, invalid.unimplemented | #CC4A45 | — |
| keyword, keyword.control, keyword.operator, keyword.other | #84AFE0 | — |
| keyword.operator.expression, keyword.operator.new, keyword.operator.optional | #84AFE0 | italic |
| keyword.other.documentation | #B3B3B3 | italic |
| keyword.other.unit | #88B8C0 | — |
| less rgb-value | #D79DAC | — |
| markup | #88B8C0 | — |
| markup.changed.diff | #D99B75 | — |
| markup.deleted.diff | #CC4A45 | — |
| markup.heading.setext, markup.italic | #B6A6E0 | — |
| markup.inserted.diff | #569E75 | — |
| markup.quote.markdown | #D79DAC | — |
| meta.arguments, meta.property, meta.symbol | #B29F86 | — |
| meta.object-literal.key, meta.scope | #CBA477 | — |
| 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 | #88B8C0 | — |
| meta.function | #88B8C0 | — |
| meta.template | #D79DAC | — |
| punctuation.bracket.angle, punctuation.section.angle-brackets | #B29F86 | — |
| punctuation.bracket, punctuation.definition, punctuation.operator, punctuation.parenthesis, punctuation.section, punctuation.separator, punctuation.terminator | #88B8C0 | — |
| punctuation.definition.directive | #84AFE0 | — |
| punctuation.definition.comment | #B3B3B3 | italic |
| punctuation.definition.string | #D79DAC | — |
| rgb-value | #88B8C0 | — |
| selector | #88B8C0 | — |
| source | #88B8C0 | — |
| source.json meta.structure.array.json > constant.language.json, source.json meta.structure.dictionary.json > constant.language.json | #D79DAC | 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 | #D79DAC | — |
| storage, storage.modifier, storage.type.function, storage.type.ts | #84AFE0 | — |
| storage.type, support.type | #B29F86 | — |
| punctuation.definition.annotation, storage.type.annotation | #CBA477 | — |
| punctuation.definition.block.tag.jsdoc, storage.type.class.jsdoc, source.embedded.ts | #B3B3B3 | italic |
| string | #D79DAC | — |
| string.quoted.docstring | #B3B3B3 | italic |
| support.class, support.function, support.module.node, support.other, support.token.decorator.python | #CBA477 | — |
| support.function.builtin.python | #B6A6E0 | — |
| support.constant | #84AFE0 | — |
| support.type.property-name, support.type.vendored.property-name.css | #88B8C0 | — |
| support.variable | #B6A6E0 | — |
| text | #88B8C0 | — |
| todo | #D99B75 | — |
| token.debug-token | #CBA477 | — |
| token.error-token | #CC4A45 | — |
| token.info-token, token.storage | #84AFE0 | — |
| token.package | #B6A6E0 | — |
| token.variable | #88B8C0 | — |
| token.warn-token | #D99B75 | — |
| variable | #88B8C0 | — |
| variable.function, variable.other | #B6A6E0 | — |
| variable.language | #84AFE0 | italic |
| variable.other | #88B8C0 | — |
| variable.parameter | #88B8C0 | — |
| wikiword.xi | #84AFE0 | — |
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}!`;
}