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 |
|---|---|---|
| — | #81B5AC | — |
| variable.parameter.function | #81B5AC | — |
| comment, punctuation.definition.comment | #2B685E | — |
| punctuation.definition.string, punctuation.definition.variable, punctuation.definition.string, punctuation.definition.parameters, punctuation.definition.string, punctuation.definition.array | #81B5AC | — |
| none | #81B5AC | — |
| keyword.operator | #81B5AC | — |
| keyword | #4C963E | — |
| variable | #3E9688 | — |
| entity.name.function, meta.require, support.function.any-method | #96883E | — |
| support.class, entity.name.class, entity.name.type.class | #3E4C96 | — |
| meta.class | #D2E7E4 | — |
| keyword.other.special-method | #96883E | — |
| storage | #4C963E | — |
| support.function | #963E4C | — |
| string, constant.other.symbol, entity.other.inherited-class | #883E96 | — |
| constant.numeric | #3E7996 | — |
| none | #3E7996 | — |
| none | #3E7996 | — |
| constant | #3E7996 | — |
| entity.name.tag | #3E9688 | — |
| entity.other.attribute-name | #3E7996 | — |
| entity.other.attribute-name.id, punctuation.definition.entity | #96883E | — |
| meta.selector | #4C963E | — |
| none | #3E7996 | — |
| markup.heading punctuation.definition.heading, entity.name.section | #96883E | |
| keyword.other.unit | #3E7996 | — |
| markup.bold, punctuation.definition.bold | #3E4C96 | bold |
| markup.italic, punctuation.definition.italic | #4C963E | italic |
| markup.raw.inline | #883E96 | — |
| string.other.link, punctuation.definition.string.end.markdown | #3E9688 | — |
| meta.link | #3E7996 | — |
| markup.list | #3E9688 | — |
| markup.quote | #3E7996 | — |
| meta.separator | #81B5AC | — |
| markup.inserted | #883E96 | — |
| markup.deleted | #3E9688 | — |
| markup.changed | #4C963E | — |
| constant.other.color | #963E4C | — |
| string.regexp | #963E4C | — |
| constant.character.escape | #963E4C | — |
| punctuation.section.embedded, variable.interpolation | #3E965B | — |
| invalid.illegal | #D2E7E4 | — |
| invalid.broken | #031A16 | — |
| invalid.deprecated | #D2E7E4 | — |
| invalid.unimplemented | #D2E7E4 | — |
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}!`;
}