Better Cobalt
Publisher: Alejandro FernándezThemes in package: 1
Cobalt, but better
Cobalt, but better
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 |
|---|---|---|
| — | #eeffffff | — |
| comment, punctuation.definition.comment | #0066cc | italic |
| support.class, support.variable.dom, support.variable.object | #80FFBB | — |
| string | #3ad900 | — |
| string.regexp | #80ffc2 | — |
| punctuation.definition.template-expression, punctuation.section.embedded | #9eff80 | — |
| meta.template.expression, source meta.embedded | #ffffff | — |
| constant, support.type.object.module, variable.language.this, keyword.control.default, variable.language.special.self, variable.parameter.function.language.special.self | #ff628c | — |
| storage.type, storage.modifier, support.type, meta.type.annotation, meta.return.type, meta.type entity.name.type, meta.return.type entity.name.type | #ffee80 | — |
| keyword, keyword.operator, meta.function storage.type, meta.class storage.type, storage.type.function, storage.type.function.arrow.js, storage.type.function.arrow.ts, storage.type.function.arrow.tsx, storage.type.js, storage.type.ts, storage.type.tsx, storage.type.interface.ts, storage.type.interface.tsx, storage.type.type.js, storage.type.type.ts, storage.type.type.tsx, storage.type.enum.ts, storage.type.enum.tsx, storage.modifier.js, storage.modifier.ts, storage.modifier.tsx | #ff9d00 | — |
| meta.definition.function, meta.definition entity.name.function, entity.name.type, meta.function.method entity.name.function, meta.object-literal.key entity.name.function, meta.function.python entity.name.function, meta.function.python support.fuction.magic | #ffdd00 | — |
| entity.other.inherited-class, meta.class.inheritance, meta.class.inheritance support.type | #80FCFF | italic |
| variable.scss, variable.sass, variable.other.readwrite.instance.ruby, variable.other.readwrite.class.ruby | #bbbbbb | — |
| meta.tag, entity.name.tag, meta.tag keyword.operator.assignment, meta.tag support.class | #9effff | — |
| meta.jsx.children | #ffffff | — |
| entity.name.tag.reference | #ff9d00 | — |
| entity.other.attribute-name.class | #5fe460 | — |
| entity.other.attribute-name.id | #ff9d00 | — |
| entity.other.attribute-name.pseudo-element | #ffdd00 | — |
| meta.attribute-selector | #ffdd00 | — |
| support.type.property-name | #80ffbb | — |
| support.constant.property-value.css | #ffee80 | — |
| markup.heading | #FFDD00 | bold |
| markup.heading punctuation.definition.heading | #C8E4FD | bold |
| markup.raw | — | — |
| markup.bold | #C1AFFF | bold |
| markup.italic | #B8FFD9 | italic |
| markup.underline.link | #5493d3 | underline |
| entity.name.tag.yaml, support.type.property-name.json | #ffee80 | — |
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}!`;
}