Clarity Noir
Publisher: Isaac CorbreyThemes in package: 1
A clear, crisp dark theme for pleasant viewing in sunlight.
A clear, crisp dark theme for pleasant viewing in sunlight.
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 |
|---|---|---|
| markup.quote | #8c8c8c | — |
| markup.quote punctuation.definition | #686868 | — |
| markup.bold | #02c7be | bold |
| punctuation.definition.bold | #686868 | — |
| markup.bold markup.italic | #02c7be | italic bold |
| markup.fenced_code.block punctuation.definition | #686868 | — |
| markup.fenced_code.block fenced_code.block.language | #ff5c7a | italic |
| markup.inline.raw | #e08300 | — |
| punctuation.definition.raw | #686868 | — |
| comment.block, comment.line | #8c8c8c | — |
| punctuation.definition.comment | #686868 | — |
| punctuation.definition.dictionary, punctuation.separator.dictionary.key-value, punctuation.separator.dictionary.pair, punctuation.separator.key-value | #8c8c8c | — |
| heading.1 | #ff3b11 | — |
| heading.2 | #ff9502 | — |
| heading.3 | #ffcc00 | — |
| heading.4 | #2acd41 | — |
| heading.5 | #027aff | — |
| heading.6 | #b051de | — |
| punctuation.definition.heading | #686868 | — |
| markup.italic | #b0e6e3 | italic |
| punctuation.definition.italic | #686868 | — |
| constant.language | #027aff | italic |
| meta.link markup.underline.link, meta.image markup.underline.link | #3392ff | underline |
| meta.image string | #ff2e55 | — |
| meta.link punctuation.definition.constant, meta.image punctuation.definition.constant, meta.link punctuation.definition.link, meta.image punctuation.definition.link, meta.link punctuation.definition.metadata, meta.image punctuation.definition.metadata | #686868 | — |
| meta.link constant.other.reference, meta.image constant.other.reference | #e0b400 | — |
| meta.link string.other.link.title | #02c7be | — |
| punctuation.definition.array, punctuation.definition.sequence, punctuation.separator.array, punctuation.separator.sequence | #8c8c8c | — |
| punctuation.definition.block.sequence.item, punctuation.definition.list | #8c8c8c | — |
| support.type.property-name, entity.name.tag | #02c7be | — |
| constant.numeric | #45d958 | — |
| markup.strikethrough | #8c8c8c | strikethrough |
| punctuation.definition.strikethrough | #686868 | — |
| string | #e08300 | — |
| punctuation.definition.table, punctuation.separator.table | #686868 | — |
| punctuation.eq.toml | #686868 | — |
| punctuation.definition.table.inline.toml | #8C8C8C | — |
| support.type.property-name.table.toml | #c076e5 | — |
| punctuation.separator.dot.toml | #8C8C8C | — |
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}!`;
}