PaperColor Dark Theme
Publisher: Haris KhanThemes in package: 1
A beautiful dark theme for VS Code inspired by the popular PaperColor vim colorscheme. Easy on the eyes with excellent readability.
A beautiful dark theme for VS Code inspired by the popular PaperColor vim colorscheme. Easy on the eyes with excellent readability.
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 | #808080 | italic |
| keyword, storage.type, storage.modifier | #d787ff | — |
| string, string.quoted | #5fff5f | — |
| string.regexp | #5fff5f | — |
| constant.character.escape | #ffaf5f | — |
| constant.numeric, constant.language, support.constant | #ff5f5f | — |
| variable, support.variable | #d0d0d0 | — |
| variable.language, variable.parameter.function | #d787ff | — |
| entity.name.function, support.function | #87d7ff | — |
| entity.name.class, entity.name.type, support.class, support.type | #ffaf5f | — |
| entity.name.tag | #87d7ff | — |
| entity.other.attribute-name | #d0d0d0 | — |
| punctuation | #d0d0d0 | — |
| punctuation.definition.string | #5fff5f | — |
| punctuation.definition.variable, punctuation.definition.parameters | #d787ff | — |
| support.constant.property-value, support.constant.font-name | #ff5f5f | — |
| meta.preprocessor | #ffaf5f | — |
| markup.heading | #87d7ff | bold |
| markup.italic | — | italic |
| markup.bold | — | bold |
| markup.underline.link | #87d7ff | italic |
| markup.raw, markup.inline.raw | #5fff5f | — |
| invalid | #ff5f5f | — |
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}!`;
}