Darcula Theme for Python
Publisher: jvmartynsThemes in package: 1
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 |
|---|---|---|
| emphasis | — | italic |
| strong | — | bold |
| header | #000080 | — |
| comment | #808080 | — |
| constant.language | #CC7832 | bold |
| constant.numeric | #6897BB | — |
| constant.regexp | #646695 | — |
| entity.name.tag | #FFC66D | — |
| entity.name.tag.css | #d7ba7d | — |
| entity.other.attribute-name | #BABABA | — |
| entity.other.attribute-name.class.css, entity.other.attribute-name.class.mixin.css, entity.other.attribute-name.id.css, entity.other.attribute-name.parent-selector.css, entity.other.attribute-name.pseudo-class.css, entity.other.attribute-name.pseudo-element.css, source.css.less entity.other.attribute-name.id, entity.other.attribute-name.attribute.scss, entity.other.attribute-name.scss, keyword.control.directive.include.c, entity.name.function.c | #d7ba7d | — |
| invalid | #903332 | — |
| markup.underline | — | underline |
| markup.bold, markup.heading | #A9B7C6 | — |
| markup.italic | — | italic |
| markup.inserted | #b5cea8 | — |
| markup.deleted | #ce9178 | — |
| markup.changed | #A9B7C6 | — |
| beginning.punctuation.definition.quote.markdown | #608b4e | — |
| beginning.punctuation.definition.list.markdown | #6796e6 | — |
| markup.inline.raw | #ce9178 | — |
| meta.selector | #d7ba7d | — |
| meta.function.python | #d7ba7d | — |
| punctuation.definition.tag | #FFC66D | — |
| meta.preprocessor | #CC7832 | — |
| meta.preprocessor.string | #ce9178 | — |
| meta.preprocessor.numeric | #b5cea8 | — |
| meta.structure.dictionary.key.python | #8f5aac | — |
| meta.diff.header | #CC7832 | — |
| meta.class.inheritance | #E6DA00 | |
| storage | red | — |
| storage.type, storage.modifier | #CC7832 | bold |
| string, string storage.type.string, string.quoted.docstring.multi, string.quoted.docstring.multi storage.type.string, comment.block.documentation.c | #6A8759 | |
| constant.character.escape | #CC682E | — |
| punctuation.definition.template-expression.begin.js, punctuation.definition.template-expression.begin.ts, punctuation.definition.template-expression.end.ts, punctuation.definition.template-expression.end.js | #A9B7C6 | — |
| support.type.vendored.property-name, support.type.property-name, variable.css, variable.scss, variable.other.less, support.variable.property.dom, variable.parameter.function.language.special | #8f5aac | — |
| variable.other.object, variable.other.object.property, support.class.dom, variable.other.property, entity.name.type.module, variable.parameter, variable.other.readwrite.alias, punctuation.separator.arguments.python | #A9B7C6 | — |
| entity.name.function.decorator, entity.name.function.decorator support.type.python | #ccbe2c | |
| keyword, keyword.control | #CC7832 | |
| keyword.operator | #A9B7C6 | — |
| keyword.operator.new, keyword.operator.expression, keyword.operator.cast, keyword.operator.sizeof, keyword.operator.logical.python, punctuation.definition.directive.c | #CC7832 | bold |
| keyword.other.unit | #b5cea8 | — |
| punctuation.separator.element, punctuation.separator.arguments | #CC7832 | italic |
| punctuation.section.embedded.begin.metatag.php, punctuation.section.embedded.end.metatag.php | #CC7832 | — |
| support.function.git-rebase | #8f5aac | — |
| support.function.builtin | #ECBE69 | — |
| constant.sha.git-rebase | #b5cea8 | — |
| storage.modifier.import.java, storage.modifier.package.java | #d4d4d4 | — |
| variable.language | #CC7832 | bold |
| entity.name.function, support.function, support.constant.handlebars, constant.other.placeholder.c | #ECBE69 | |
| constant.other.caps | #8F5AAC | — |
| meta.return-type, storage.type.cs, storage.type.generic.cs, storage.type.modifier.cs, storage.type.variable.cs, storage.type.annotation.java, storage.type.generic.java, storage.type.java, storage.type.object.array.java, storage.type.primitive.array.java, storage.type.primitive.java, storage.type.token.java, storage.type.groovy, storage.type.annotation.groovy, storage.type.parameters.groovy, storage.type.generic.groovy, storage.type.object.array.groovy, storage.type.primitive.array.groovy, storage.type.primitive.groovy, string.quoted.other.lt-gt.include.c, string.quoted.double.include.c | #A9B7C6 | — |
| support.class, entity.name.class, entity.name.type.class.python | #E6DA00 | bold |
| support.type, entity.name.type | #E6DA00 | — |
| storage.type.function.arrow | #A9B7C6 | — |
| meta.type.cast.expr, meta.type.new.expr, support.constant.math, support.constant.dom, support.constant.json | #4EC9B0 | — |
| keyword.control | #CC7832 | bold |
| meta.definition.variable.name, support.variable | #A9B7C6 | — |
| — | #A9B7C6 | — |
| meta.object-literal.key, meta.object-literal.key entity.name.function | #8f5aac | — |
| support.constant.property-value, support.constant.font-name, support.constant.media-type, support.constant.media, constant.other.color.rgb-value, constant.other.rgb-value, support.constant.color | #CE9178 | — |
| token.info-token | #6796e6 | — |
| token.warn-token | #cd9731 | — |
| token.error-token | #f44747 | — |
| token.debug-token | #b267e6 | — |
| variable.parameter | #E047FF | — |
| support.function.magic, support.variable.magic.python, support.variable.magic.custom.python, meta.attribute.magic.python | #A152A8 | — |
| variable.language.special | #a152a8 |
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}!`;
}