Monokai Accents
Publisher: twThemes in package: 8
A dark Monokai theme with choice of accent color.
A dark Monokai theme with choice of accent color.
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 |
|---|---|---|
| entity.name.class, entity.name.module, entity.name.type, storage.identifier, support.class | #a6e22e | — |
| comment, string.comment | #8c8c8c | — |
| constant.language | #ff80f4 | — |
| constant.numeric | #ff80f4 | — |
| constant.character, constant.other | #ff80f4 | — |
| punctuation.section.embedded.begin.js, punctuation.section.embedded.end.js, punctuation.section.embedded.begin.erb, punctuation.section.embedded.end.erb, source.elixir.embedded, punctuation.separator, punctuation.accessor, meta.brace | #f6f6f6 | — |
| string.embedded.begin, string.embedded.end, punctuation.definition.template-expression, punctuation.section.embedded | #ff80f4 | — |
| entity.other.inherited-class | #a6e22e | italic underline |
| keyword, keyword.operator.logical, keyword.operator.constructor | #f82e76 | — |
| keyword.operator | #f82e76 | — |
| variable.language | #f82e76 | — |
| punctuation.definition.array, punctuation.definition.begin, punctuation.definition.block, punctuation.definition.dictionary, punctuation.definition.end, punctuation.definition.parameters, punctuation.definition.tag, punctuation.section, punctuation.separator.dictionary, punctuation.terminator | #f6f6f6 | — |
| storage | #f82e76 | — |
| string, string.template | #ffee99 | — |
| text | #f6f6f6 | — |
| storage.type | #65d7fd | — |
| entity.name.function, support.function | #a6e22e | — |
| variable.parameter, entity.name.variable.parameter, parameter.variable | #fd971f | italic |
| entity.name.tag, entity.name.tag.class.js | #f82e76 | — |
| entity.name.tag.class, entity.name.tag.id | #65d7fd | — |
| entity.other.attribute-name | #a6e22e | — |
| variable.other.object, variable.other.constant, variable.other.global, variable.other.readwrite.class, variable.other.readwrite.instance, variable.other.readwrite.batchfile, variable.readwrite, variable.readwrite.other.block | #75c0fc | — |
| variable.object.property, variable.other, variable.other.block, variable.other.property | #f6f6f6 | — |
| storage.modifier.import, storage.modifier.package | #75c0fc | — |
| entity.name.function-call | #f6f6f6 | — |
| function.support.builtin, function.support.core | #a6e22e | — |
| support.constant | #ff80f4 | — |
| support.type, support.variable | #65d7fd | — |
| support.dictionary.json | #65d7fd | — |
| support.type.property-name.css, support.type.property-name.scss, support.type.property-name.less, support.type.property-name.sass | #65d7fd | — |
| support.constant.css, support.constant.scss, support.constant.less, support.constant.sass | #a6e22e | — |
| entity.other.attribute-name.pseudo-class.css, entity.other.attribute-name.pseudo-class.scss, entity.other.attribute-name.pseudo-class.less, entity.other.attribute-name.pseudo-class.sass, entity.other.attribute-name.pseudo-element.css, entity.other.attribute-name.pseudo-element.scss, entity.other.attribute-name.pseudo-element.less, entity.other.attribute-name.pseudo-element.sass | #1e95bf | — |
| variable.css, variable.scss, variable.less, variable.sass | #fd971f | — |
| function.css, function.scss, function.less, function.sass | #a6e22e | — |
| unit.css, unit.scss, unit.less, unit.sass | #ff80f4 | — |
| variable.css.string, variable.scss.string, variable.less.string, variable.sass.string | #ffee99 | — |
| support.other.variable | f8f8f2 | |
| invalid | #f6f6f6 | — |
| invalid.deprecated | #f6f6f6 | — |
| support.type.property-name.json | #65d7fd | — |
| string.detected-link | #75c0fc | — |
| constant.numeric.line-number.find-in-files - match | #88d1d8A0 | — |
| markup.changed | #ffee99 | — |
| markup.deleted | #f82e76 | — |
| meta.diff, meta.diff.header | #75715E | — |
| markup.inserted | #a6e22e | — |
| entity.name.filename.find-in-files | #ffee99 | — |
| markup.raw.block.markdown, markup.raw.inline.markdown, markup.inline.raw.string.markdown, markup.fenced_code.block.markdown | #ffee99 | — |
| markup.bold.markdown | #fd971f | bold |
| markup.italic, markup.italic.markdown | #fd971f | italic |
| markup.fenced_code.block.markdown | #ffee99 | — |
| markup.heading.1.markdown | #5faa86 | bold |
| markup.heading.2.markdown | #7bd88f | bold |
| markup.heading.3.markdown | #78e6d0 | bold |
| markup.heading.4.markdown | #66d6ed | bold |
| markup.heading.5.markdown | #02BDD3 | bold |
| markup.heading.6.markdown | #0294a5 | bold |
| markup.heading.7.markdown | #008BFF | bold |
| punctuation.definition.heading.markdown | #c1e4d3 | bold |
| markup.underline.link.markdown | #75c0fc | — |
| markup.list.unnumbered.markdown, markup.list.numbered.markdown | #f6f6f6 | — |
| punctuation.definition.italic.markdown, punctuation.definition.bold.markdown, punctuation.definition.heading.markdown, punctuation.definition.raw.markdown | #ff80f4 | — |
| punctuation.definition.list, punctuation.definition.list.begin.markdown | #ff80f4 | bold |
| markup.quote.markdown | #fd971f | — |
| meta.separator.markdown | #ff80f4 | bold |
| markup.strikethrough.markdown | #636363 | — |
| entity.name.type | #dfbafd | — |
| source.swift | #f6f6f6 | — |
| storage.type.swift | #f82e76 | — |
| variable.other.swift | #65d7fd | — |
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}!`;
}