One Dark Darkened
Publisher: Craft LabsThemes in package: 1
A darkened, higher-contrast variant of One Dark, ported from the Zed theme by pavles6.
A darkened, higher-contrast variant of One Dark, ported from the Zed theme by pavles6.
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 |
|---|---|---|
| — | #acb2be | — |
| comment, punctuation.definition.comment | #5d636f | italic |
| comment.documentation, comment.block.documentation | #878e98 | italic |
| variable, string constant.other.placeholder | #c8ccd4 | — |
| variable.language, variable.other.special, variable.parameter | #bf956a | — |
| constant, constant.language, constant.numeric, constant.other | #dfc184 | — |
| constant.numeric, variable.other.constant | #bf956a | — |
| string, text.literal | #a1c181 | — |
| constant.character.escape, string.escape | #878e98 | — |
| string.regexp | #bf956a | — |
| keyword, storage.type, storage.modifier | #b477cf | — |
| keyword.operator | #6eb4bf | — |
| entity.name.function, support.function, meta.function-call.generic | #73ade9 | — |
| entity.name.type, entity.name.class, support.type, support.class, storage.type.class | #6eb4bf | — |
| entity.name.function.constructor, support.class.builtin | #73ade9 | — |
| entity.name.enum, variable.other.enummember | #d07277 | — |
| entity.other.attribute-name, entity.name.tag | #74ade8 | — |
| variable.other.property, variable.other.object.property, meta.object-literal.key | #e78284 | — |
| punctuation, meta.brace | #acb2be | — |
| punctuation.separator, punctuation.terminator, punctuation.accessor | #b2b9c6 | — |
| entity.name.namespace, entity.name.module | #c8ccd4 | — |
| entity.name.label | #74ade8 | — |
| markup.underline.link, string.other.link | #6eb4bf | — |
| markup.heading | #d07277 | bold |
| markup.bold | #bf956a | bold |
| markup.italic | #74ade8 | italic |
| markup.list, punctuation.definition.list.begin | #d07277 | — |
| meta.preprocessor, keyword.control.import, keyword.control.export | #dce0e5 | — |
| invalid, invalid.illegal | #d07277 | — |
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}!`;
}