Base16 Themes
Publisher: J. Ryan StinnettThemes in package: 76
Base 16 themes ported from TextMate/Sublime
Base 16 themes ported from TextMate/Sublime
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 |
|---|---|---|
| — | #645240 | — |
| variable.parameter.function | #645240 | — |
| comment, punctuation.definition.comment | #b8afad | — |
| punctuation.definition.string, punctuation.definition.variable, punctuation.definition.string, punctuation.definition.parameters, punctuation.definition.string, punctuation.definition.array | #645240 | — |
| none | #645240 | — |
| keyword.operator | #645240 | — |
| keyword | #a89bb9 | — |
| variable | #cb6077 | — |
| entity.name.function, meta.require, support.function.any-method | #8ab3b5 | — |
| support.class, entity.name.class, entity.name.type.class | #d28b71 | — |
| meta.class | #534636 | — |
| keyword.other.special-method | #8ab3b5 | — |
| storage | #a89bb9 | — |
| support.function | #7bbda4 | — |
| string, constant.other.symbol, entity.other.inherited-class | #beb55b | — |
| constant.numeric | #d28b71 | — |
| none | #d28b71 | — |
| none | #d28b71 | — |
| constant | #d28b71 | — |
| entity.name.tag | #cb6077 | — |
| entity.other.attribute-name | #d28b71 | — |
| entity.other.attribute-name.id, punctuation.definition.entity | #8ab3b5 | — |
| meta.selector | #a89bb9 | — |
| none | #d28b71 | — |
| markup.heading punctuation.definition.heading, entity.name.section | #8ab3b5 | |
| keyword.other.unit | #d28b71 | — |
| markup.bold, punctuation.definition.bold | #d28b71 | bold |
| markup.italic, punctuation.definition.italic | #a89bb9 | italic |
| markup.raw.inline | #beb55b | — |
| string.other.link | #cb6077 | — |
| meta.link | #d28b71 | — |
| markup.list | #cb6077 | — |
| markup.quote | #d28b71 | — |
| meta.separator | #645240 | — |
| markup.inserted | #beb55b | — |
| markup.deleted | #cb6077 | — |
| markup.changed | #a89bb9 | — |
| constant.other.color | #7bbda4 | — |
| string.regexp | #7bbda4 | — |
| constant.character.escape | #7bbda4 | — |
| punctuation.section.embedded, variable.interpolation | #bb9584 | — |
| invalid.illegal | #f5eeeb | — |
| invalid.broken | #3B3228 | — |
| invalid.deprecated | #f5eeeb | — |
| invalid.unimplemented | #3B3228 | — |
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}!`;
}