One Dark Code
Publisher: LucasOeThemes in package: 1
Atom's iconic One Dark theme for Visual Studio Code
Atom's iconic One Dark theme for Visual Studio Code
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, invalid.illegal | #e45454 | — |
| invalid.deprecated | — | strikethrough |
| comment, punctuation.definition.comment, unused.comment, wildcard.comment | #7f848e | italic |
| comment keyword.codetag.notation, comment.block.documentation keyword, comment.block.documentation storage.type.class | #c678dd | — |
| comment.block.documentation entity.name.type | #e5c07b | — |
| comment.block.documentation variable | #d19a66 | — |
| entity.name.type.class, entity.name.class, support.class | #e5c07b | — |
| entity.name.namespace | #e5c07b | — |
| keyword.expressions-and-types.swift, keyword.other.this, variable.language, variable.language punctuation.definition.variable.php, variable.other.readwrite.instance.ruby, variable.parameter.function.language.special | #d19a66 | italic |
| constant, support.constant | #d19a66 | — |
| constant.character.escape, constant.character.string.escape, constant.regexp | #56b6c2 | — |
| variable, entity.name.variable | #e06c75 | — |
| meta.import variable.other.readwrite | #e06c75 | — |
| entity.name.function, support.function, keyword.operator.function, meta.function-call.generic.python | #61afef | — |
| variable.parameter, entity.name.variable.parameter, meta.function.definition variable.parameter, meta.function.definition variable.language, meta.function.definition variable.other, meta.at-rule.function variable, meta.at-rule.mixin variable | #d19a66 | italic |
| meta.decorator variable.other.readwrite, meta.decorator variable.other.property, punctuation.decorator | #56b6c2 | italic |
| meta.attribute, meta.attribute punctuation | #abb2bf | — |
| entity.name.function.macro | #56b6c2 | — |
| keyword, keyword.control punctuation, punctuation.definition.keyword, keyword.operator.new, keyword.operator.expression | #c678dd | — |
| keyword.operator | #56b6c2 | — |
| keyword.operator.type.annotation, keyword.operator.namespace, keyword.operator.key-value, keyword.operator.access.dot | #abb2bf | — |
| keyword.other.unit | #e06c75 | — |
| storage | #c678dd | — |
| support.type, entity.name.type, storage.type.java, storage.type.generic.java | #e5c07b | — |
| punctuation, string.template meta.brace.square, string.template punctuation.accessor, meta.brace | #abb2bf | — |
| string, punctuation.definition.string, meta.attribute-selector | #98c379 | — |
| punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.definition.interpolation, punctuation.section.embedded, meta.interpolation | #c678dd | — |
| entity.name.tag | #e06c75 | — |
| entity.other.attribute-name | #d19a66 | italic |
| variable.other.property, variable.other.object.property, entity.name.variable.property | #abb2bf | — |
| support.type.property-name, support.type.property-name punctuation, meta.object-literal.key, meta.object-literal.key entity.name.function | #e06c75 | — |
| entity.name.variable.field | #abb2bf | — |
| support.type.property-name.css, support.type.vendored.property-name | #abb2bf | — |
| entity.other.attribute-name.class, entity.other.attribute-name.class punctuation | #d19a66 | — |
| entity.other.attribute-name.id, entity.other.attribute-name.id punctuation | #56b6c2 | — |
| entity.other.attribute-name.pseudo-class, entity.other.attribute-name.pseudo-element, entity.other.attribute-name.pseudo-class punctuation | #c678dd | — |
| meta.at-rule.header | #e06c75 | — |
| meta.at-rule.apply.tailwind entity.other.attribute-name.class | #98c379 | — |
| bem.support.modifier.scss, variable.parameter.url.scss | #e06c75 | — |
| markup.inserted | #98c379 | — |
| markup.deleted | #e06c75 | — |
| markup.changed | #e5c07b | — |
| string.regexp, constant.other.character-class.set.regexp, constant.character.escape.backslash.regexp | #98c379 | — |
| storage.modifier.import | #e5c07b | — |
| meta.use.rust keyword.operator | #d19a66 | — |
| meta.function.definition.rust keyword.operator.math | #abb2bf | — |
| meta.interpolation.rust | #e06c75 | — |
| variable.language.base | #c678dd | — |
| log.error, log.exceptiontype | #e45454 | — |
| log.warning | #d19a66 | — |
| log.info | #61afef | — |
| log.constant | #abb2bf | — |
| source.js entity.name.tag, source.ts entity.name.tag, source.jsx entity.name.tag, source.tsx entity.name.tag | #c678dd | — |
| entity.name.tag.html, entity.name.tag.jsx, entity.name.tag.tsx, entity.name.tag.xml, entity.name.tag.localname.xml | #e06c75 | — |
| emphasis | — | italic |
| strong | — | bold |
| *url*, *link*, *uri* | — | underline |
| markup.italic, punctuation.definition.italic | #d19a66 | italic |
| markup.bold, punctuation.definition.bold | #d19a66 | bold |
| markup.bold markup.italic, markup.bold punctuation.definition.italic | — | bold italic |
| markup.underline | — | underline |
| markdown.heading, markup.heading | markup.heading entity.name, markup.heading.markdown punctuation.definition.heading.markdown, entity.name.section.markdown | #e06c75 | — |
| meta.link.inline.markdown, markup.underline.link | #61afef | — |
| string.other.link.title.markdown | #c678dd | — |
| string.other.link.description.title.markdown | #98c379 | — |
| constant.other.reference.link.markdown | #d19a66 | — |
| fenced_code.block.language, markup.raw.inner.restructuredtext, markup.fenced_code.block.markdown punctuation.definition.markdown, markup.inline.raw, markup.raw.restructuredtext | #98c379 | — |
| markup.quote.markdown, punctuation.definition.quote | #7f848e | — |
| punctuation.definition.list | #e5c07b | — |
| punctuation.definition.metadata.markdown, punctuation.definition.link.title.end.markdown, punctuation.definition.link.title.begin.markdown | #abb2bf | — |
| markup.math, markup.math constant.numeric, markup.math punctuation | #56b6c2 | — |
| markup.math punctuation.definition.constant, markup.math constant.character | #98c379 | — |
| markup.math punctuation.definition | #d19a66 | — |
| markup.math entity.name.function, markup.math punctuation.definition.function | #61afef | — |
| punctuation.definition.math | #c678dd | — |
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}!`;
}