Darcula Theme (JetBrains Port)
Publisher: tocknThemes in package: 1
JetBrains Darcula theme for VSCode and Cursor
JetBrains Darcula theme for VSCode and Cursor
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 |
|---|---|---|
| comment, punctuation.definition.comment | #808080 | italic |
| string, string.quoted, string.template | #6A8759 | — |
| punctuation.definition.string, punctuation.definition.string.begin, punctuation.definition.string.end, string punctuation.definition.string.begin.jsx, string punctuation.definition.string.end.jsx, string punctuation.definition.string.begin.tsx, string punctuation.definition.string.end.tsx | #6A8759 | — |
| punctuation.definition.template-expression, meta.template.expression | #A9B7C6 | — |
| constant.numeric | #6897BB | — |
| constant.language.boolean, constant.language.true, constant.language.false | #CC7832 | — |
| constant.language.undefined | #CC7832 | — |
| constant.language.null | #9876AA | — |
| constant.character, constant.other, variable.other.enummember | #9876AA | — |
| variable.other.constant, variable.other.constant.js, variable.other.constant.ts, variable.other.constant.jsx, variable.other.constant.tsx | #A9B7C6 | — |
| variable, variable.other.readwrite, variable.other.object, variable.other.property | #A9B7C6 | — |
| variable.language.this, variable.language.this.js, variable.language.this.ts, variable.language.this.jsx, variable.language.this.tsx | #CC7832 | — |
| variable.other.object.property, variable.other.property, support.variable.property | #9876AA | — |
| keyword, keyword.control, keyword.operator.new, keyword.operator.expression | #CC7832 | — |
| keyword.operator.logical, keyword.operator.comparison, keyword.operator.relational | #A9B7C6 | — |
| storage, storage.type, storage.modifier | #CC7832 | — |
| storage.type.function.arrow, storage.type.function | #CC7832 | — |
| entity.name.class, entity.name.type.class, support.class, entity.other.inherited-class | #A9B7C6 | — |
| entity.name.type, entity.name.type.interface, support.type.primitive, support.type, entity.name.type.ts, entity.name.type.tsx, entity.name.type.class.ts, entity.name.type.class.tsx, entity.name.type.interface.ts, entity.name.type.interface.tsx, entity.name.type.alias, entity.name.type.enum, meta.type.annotation, support.type.builtin | #A9B7C6 | — |
| meta.type.annotation entity.name.type, meta.type.annotation support.type, meta.return.type entity.name.type, meta.return.type support.type | #A9B7C6 | — |
| entity.name.function, support.function, entity.name.method | #FFC66D | — |
| meta.function-call, variable.function, keyword.other.special-method | #A9B7C6 | — |
| variable.parameter, meta.parameter | #A9B7C6 | — |
| entity.name.tag, meta.tag.sgml | #CC7832 | — |
| entity.other.attribute-name | #FFC66D | — |
| support.function.any-method | #FFC66D | — |
| punctuation.separator.continuation | #A9B7C6 | — |
| support.constant | #9876AA | — |
| support.variable | #9876AA | — |
| invalid, invalid.illegal | #FF6B68 | — |
| invalid.deprecated | #D7BA7D | — |
| keyword.operator | #A9B7C6 | — |
| punctuation | #A9B7C6 | — |
| punctuation.terminator | #A9B7C6 | — |
| punctuation.separator.comma, punctuation.separator.parameter, punctuation.separator.arguments, punctuation.separator.list, punctuation.separator.delimiter | #CC7832 | — |
| punctuation.accessor | #A9B7C6 | — |
| support.class.console, support.type.object.console | #A9B7C6 | — |
| meta.object-literal.key, meta.object.member, meta.object-literal.key.js, meta.object-literal.key.ts, meta.object-literal.key.jsx, meta.object-literal.key.tsx | #9876AA | — |
| meta.method.declaration, meta.function.expression | #FFC66D | — |
| support.type.object.dom, support.class.dom | #A9B7C6 | — |
| support.type.object.node, support.module.node | #A9B7C6 | — |
| support.class.promise, support.type.object.promise | #B9BCD1 | — |
| meta.import, meta.export | #A9B7C6 | — |
| support.class.component.jsx, support.class.component.tsx, support.class.component | #33D0AD | — |
| entity.name.tag.jsx, entity.name.tag.tsx | #FFC66D | — |
| punctuation.definition.tag.jsx, punctuation.definition.tag.tsx, punctuation.definition.tag.begin.jsx, punctuation.definition.tag.end.jsx, punctuation.definition.tag.begin.tsx, punctuation.definition.tag.end.tsx | #FFC66D | — |
| entity.name.tag.html | #CC7832 | — |
| entity.other.attribute-name.jsx, entity.other.attribute-name.tsx, meta.tag.attributes.jsx entity.other.attribute-name, meta.tag.attributes.tsx entity.other.attribute-name | #A9B7C6 | — |
| meta.embedded.expression.jsx, meta.embedded.expression.tsx | #A9B7C6 | — |
| markup.heading, markup.heading entity.name | #CC7832 | bold |
| markup.italic | #A9B7C6 | italic |
| markup.bold | #A9B7C6 | bold |
| markup.underline | — | underline |
| markup.underline.link, string.other.link | #287BDE | — |
| markup.quote | #6A8759 | italic |
| markup.raw, markup.inline.raw | #6A8759 | — |
| support.type.property-name.css, support.type.vendored.property-name | #FFC66D | — |
| support.constant.property-value.css, support.constant.color.css | #6A8759 | — |
| entity.name.tag.css, entity.other.attribute-name.class.css, entity.other.attribute-name.id.css, entity.other.attribute-name.pseudo-class.css, entity.other.attribute-name.pseudo-element.css | #CC7832 | — |
| keyword.other.unit.css | #6897BB | — |
| support.type.property-name.json, meta.structure.dictionary.key.json, meta.object-literal.key.json, meta.structure.dictionary.json meta.structure.dictionary.key.json string.quoted.double.json, meta.structure.dictionary.json support.type.property-name.json | #9876AA | — |
| string.quoted.double.json, meta.structure.dictionary.value.json string, meta.structure.array.json string | #6A8759 | — |
| meta.structure.dictionary.value.json punctuation.definition.string, meta.structure.array.json punctuation.definition.string | #6A8759 | — |
| constant.language.json, constant.language.boolean.true.json, constant.language.boolean.false.json | #CC7832 | — |
| constant.language.null.json | #CC7832 | — |
| constant.numeric.json, meta.structure.dictionary.value.json constant.numeric, meta.structure.array.json constant.numeric | #6897BB | — |
| punctuation.definition.dictionary.begin.json, punctuation.definition.dictionary.end.json, punctuation.definition.array.begin.json, punctuation.definition.array.end.json, punctuation.separator.dictionary.key-value.json, meta.structure.dictionary.json punctuation.definition.dictionary, meta.structure.array.json punctuation.definition.array | #A9B7C6 | — |
| punctuation.separator.dictionary.pair.json, punctuation.separator.array.json | #CC7832 | — |
| punctuation.support.type.property-name.begin.json, punctuation.support.type.property-name.end.json, meta.structure.dictionary.key.json punctuation.definition.string | #9876AA | — |
| entity.name.tag.yaml | #9876AA | — |
| string.regexp | #629755 | — |
| constant.character.character-class.regexp, constant.other.character-class.set.regexp, constant.other.character-class.regexp, constant.character.set.regexp | #CC7832 | — |
| keyword.control.anchor.regexp | #CC7832 | — |
| keyword.operator.quantifier.regexp | #6897BB | — |
| markup.inserted, meta.diff.header.to-file | #629755 | — |
| markup.deleted, meta.diff.header.from-file | #C75450 | — |
| markup.changed | #528CC7 | — |
| meta.function.decorator.python, entity.name.function.decorator.python | #BBB529 | — |
| variable.language.special.self.python, variable.parameter.function.language.special.self.python | #94558D | — |
| entity.name.package.go | #A9B7C6 | — |
| entity.name.namespace.go, support.other.module.go | #BACC7C | — |
| entity.name.type.go, support.type.go, storage.type.go, entity.other.inherited-class.go | #A9B7C6 | — |
| keyword.operator.pointer.go, keyword.operator.address.go, punctuation.definition.variable.go | #A9B7C6 | — |
| entity.name.type.qualified.go, support.type.qualified.go, entity.name.type.package.go | #6A8759 | — |
| entity.name.package.qualified.go, variable.other.module.go, entity.name.import.go | #BACC7C | — |
| support.type.builtin.go, storage.type.string.go, storage.type.numeric.go, storage.type.boolean.go, storage.type.byte.go, storage.type.error.go, storage.type.int.go, storage.type.bool.go | #CC7832 | — |
| keyword.control.go, keyword.function.go, keyword.import.go, keyword.package.go, keyword.type.go, keyword.struct.go, keyword.interface.go, keyword.const.go, keyword.var.go | #CC7832 | — |
| constant.language.go, constant.language.nil.go | #CC7832 | — |
| entity.name.function.go | #FFC66D | — |
| support.function.go, meta.function-call.go | #A9B7C6 | — |
| support.function.builtin.go | #FFC66D | — |
| variable.other.go, variable.parameter.go, variable.other.assignment.go | #A9B7C6 | — |
| variable.parameter.receiver.go, variable.other.receiver.go, meta.receiver.go variable.parameter.go | #5EA4B9 | — |
| variable.other.property.go, variable.other.member.go, punctuation.accessor.go | #9876AA | — |
| meta.struct.field.go, variable.field.go | #9876AA | — |
| keyword.operator.go, keyword.operator.assignment.go, keyword.operator.comparison.go, keyword.operator.logical.go, keyword.operator.arithmetic.go | #A9B7C6 | — |
| punctuation.other.period.go, punctuation.separator.namespace.go | #A9B7C6 | — |
| entity.name.lifetime.rust | #20999D | — |
| entity.name.function.macro.rust | #BBB529 | — |
| entity.name.type.parameter, meta.type.parameters, support.type.parameter, storage.type.generic | #5C918C | — |
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}!`;
}