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