Semantic Colors
Publisher: Sergey BovyrinThemes in package: 1
The theme is inspired by natural colors and brings semantic meaning to syntax highlighting
The theme is inspired by natural colors and brings semantic meaning to syntax highlighting
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 |
|---|---|---|
| invalid | #cf5454 | — |
| comment, comment punctuation, comment entity, comment string, comment meta.link string, comment keyword, comment storage, comment support, comment constant, comment constant.language, comment variable, comment markup storage, comment meta.tag entity, comment meta.tag entity.other | #5a564e99 | italic |
| text, constant, entity, variable, punctuation, support, support.constant, meta.class support.class, meta.var support.class, meta.var support.constant, meta.import constant.language, meta.tag entity.other, meta.selector entity.other, string, string.regexp constant, meta.property-value constant.other.color, markup.quote | #5a564e | — |
| entity.name.function, meta.function support, meta.function-call support, meta.tag entity support.class, meta.method.declaration storage, markup meta.link, source.shell support.function | #37a4ae | — |
| keyword, storage, constant.language, markup.raw, markup.inline.raw, string meta.template punctuation, keyword punctuation, meta.tag entity, meta.property-value support.constant, source.shell string.interpolated punctuation, support.type.property-name.json | #c09159 | — |
| meta.type support, meta.type entity, meta.type string, meta.type meta.brace, meta.return.type entity, meta.return.type support, meta.other.type keyword, meta.other.type support, meta.other.type support.class, meta.function storage.type.php, comment entity.name.type | #d58a91 | — |
| markup.italic, string, string.regexp | — | italic |
| constant.character, markup.heading, markup.bold, meta.selector entity, meta.property-value keyword.other.important | — | bold |
| comment storage, comment keyword | — | italic bold |
| markup meta.link | — | italic underline |
| comment markup storage | — |
TypeScript sample highlighted with this variant's colors and tokenColors.
Loading...
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}!`;
}
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}!`;
}