Adapt Colors
Publisher: ToneThemes in package: 1
A dynamic color theme that responds to your system accent color and generates all colors relative to it
A dynamic color theme that responds to your system accent color and generates all colors relative to it
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 | #8a8a94 | italic |
| string, string.quoted, string.template, punctuation.definition.string | #b2a5d8 | — |
| constant.character.escape, string.regexp | #e0859b | — |
| constant.numeric, constant.numeric.integer, constant.numeric.float, constant.numeric.hex | #986cd4 | — |
| constant, constant.language, constant.character | #9d70db | — |
| constant.language.boolean | #9d70db | — |
| keyword, keyword.control, keyword.operator.new, keyword.operator.expression, keyword.operator.logical, keyword.operator.delete, keyword.operator.typeof, keyword.operator.instanceof, keyword.operator.void, storage.type, storage.modifier | #d65c79 | — |
| keyword.control.conditional, keyword.control.loop, keyword.control.flow, keyword.control.import, keyword.control.export, keyword.control.from, keyword.control.return, keyword.control.default | #d65c79 | — |
| keyword.operator, punctuation.accessor, punctuation.separator | #b366cb | — |
| entity.name.function, meta.function-call.generic, support.function, variable.function | #be9fde | — |
| entity.name.function, meta.definition.function entity.name.function | #be9fde | — |
| entity.name.type, entity.name.class, entity.other.inherited-class, support.type, support.class, storage.type.primitive, entity.name.type.class | #db9470 | — |
| entity.name.type.interface | #db9470 | — |
| entity.name.type.parameter | #db9470 | italic |
| variable, variable.other | #d5d5da | — |
| variable.language, variable.language.this, variable.language.self | #d65c79 | — |
| variable.parameter, meta.parameters variable | #e0859b | italic |
| variable.other.property, support.variable.property, meta.object-literal.key | #db9470 | — |
| entity.name.tag, punctuation.definition.tag | #d65c79 | — |
| entity.other.attribute-name | #db9470 | — |
| meta.decorator, entity.name.function.decorator, punctuation.decorator | #d65c79 | — |
| entity.name.namespace, entity.name.type.module | #db9470 | — |
| support.constant, support.variable | #9d70db | — |
| markup.heading, entity.name.section | #e0859b | bold |
| markup.bold | — | bold |
| markup.italic | — | italic |
| markup.underline | — | underline |
| markup.underline.link, string.other.link | #db708a | — |
| markup.inline.raw, markup.raw.block, markup.fenced_code.block | #e0859b | — |
| markup.quote | #b2a5d8 | italic |
| markup.list, punctuation.definition.list | #d65c79 | — |
| markup.inserted, meta.diff.header.to-file | #88d888 | — |
| markup.deleted, meta.diff.header.from-file | #e88888 | — |
| markup.changed | #d9b878 | — |
| invalid, invalid.illegal | #e88888 | — |
| invalid.deprecated | #d9b878 | strikethrough |
| punctuation, meta.brace | #e8e8ec | — |
| support.type.property-name.json | #db9470 | — |
| entity.name.tag.yaml | #db9470 | — |
| support.type.property-name.css, support.type.property-name.scss | #db9470 | — |
| support.constant.property-value.css, support.constant.property-value.scss | #9d70db | — |
| entity.other.attribute-name.class.css, entity.other.attribute-name.id.css | #be9fde | — |
| entity.other.attribute-name.pseudo-class.css, entity.other.attribute-name.pseudo-element.css | #d65c79 | — |
| variable.other.normal.shell, variable.other.positional.shell, variable.other.bracket.shell | #d65c79 | — |
| string.regexp, constant.other.character-class.regexp | #e0859b | — |
| variable.pattern.wolfram | #97818a | — |
| symbol.unrecognized.wolfram | #97818a | — |
| support.function.builtin.wolfram | #cb667e | — |
| entity.name.function.wolfram, variable.function.wolfram | #d7e5b2 | — |
| support.constant.wolfram, support.type.wolfram, constant.language.wolfram | #cb667e | — |
| variable.other.wolfram, variable.wolfram | #d5d5da | — |
| variable.parameter.wolfram, variable.pattern.wolfram, entity.name.variable.pattern.wolfram | #ab85e0 | italic |
| variable.language.slot.wolfram, constant.language.slot.wolfram | #e0859b | — |
| keyword.control.wolfram, keyword.operator.wolfram, keyword.other.wolfram | #d65c79 | — |
| string.quoted.double.wolfram, string.wolfram | #b2a5d8 | — |
| constant.numeric.wolfram, constant.numeric.integer.wolfram, constant.numeric.real.wolfram | #986cd4 | — |
| comment.block.wolfram, comment.line.wolfram | #8a8a94 | italic |
| keyword.operator.assignment.wolfram, keyword.operator.rule.wolfram, keyword.operator.arithmetic.wolfram, keyword.operator.comparison.wolfram, keyword.operator.logical.wolfram, punctuation.separator.wolfram | #b366cb | — |
| punctuation.section.brackets.wolfram, punctuation.section.braces.wolfram, punctuation.section.parens.wolfram, meta.brackets.wolfram, meta.braces.wolfram, meta.parens.wolfram | #e8e8ec | — |
| entity.name.tag.wolfram, support.type.message.wolfram | #db9470 | — |
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}!`;
}