Java Dark Theme
Publisher: Heejun.netThemes in package: 1
IntelliJ-inspired dark theme for Java and Kotlin
IntelliJ-inspired dark theme for Java and Kotlin
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 |
|---|---|---|
| source.java, source.kotlin | #A9B7C6 | — |
| comment.line.double-slash.java, comment.block.java, punctuation.definition.comment.java, comment.line.double-slash.kotlin, comment.block.kotlin, punctuation.definition.comment.kotlin | #808080 | italic |
| comment.block.javadoc, comment.block.javadoc keyword.other, comment.block.javadoc entity.name.type | #79A977 | italic |
| comment.block.javadoc storage.type, comment.block.javadoc keyword | #79A977 | bold italic |
| comment.block.kdoc.kotlin, comment.block.kdoc.kotlin keyword.other, comment.block.kdoc.kotlin entity.name.type | #629755 | italic |
| string.quoted.double.java, string.quoted.single.java, string.quoted.double.kotlin, string.quoted.single.kotlin, string.template.kotlin | #6A8759 | — |
| constant.character.escape.java, constant.character.escape.kotlin | #C08A50 | — |
| keyword.control.java, keyword.operator.java, storage.modifier.java, storage.type.primitive.java, keyword.control.kotlin, keyword.operator.kotlin, storage.modifier.kotlin, storage.type.builtin.kotlin | #CC7832 | — |
| keyword.other.import.java, keyword.other.package.java, keyword.other.import.kotlin, keyword.other.package.kotlin | #CC7832 | — |
| storage.type.java, entity.name.type.java, entity.other.inherited-class.java, storage.type.kotlin, entity.name.type.kotlin, entity.other.inherited-class.kotlin | #A9B7C6 | — |
| storage.type.annotation.java, punctuation.definition.annotation.java, entity.name.type.annotation.java, meta.declaration.annotation.java entity.name.type.class.java, meta.declaration.annotation.java entity.name.type.java, meta.annotation.java entity.name.type.class.java, meta.annotation.java entity.name.type.java, meta.annotation.java entity.name.type, meta.annotation.java entity.name.type.interface.java, storage.type.annotation.kotlin, punctuation.definition.annotation.kotlin, entity.name.type.annotation.kotlin, meta.annotation.kotlin entity.name.type.class.kotlin, meta.annotation.kotlin entity.name.type.kotlin | #BBB529 | — |
| constant.language.java, constant.language.kotlin | #CC7832 | bold |
| constant.numeric.java, constant.numeric.integer.kotlin, constant.numeric.float.kotlin, constant.numeric.long.kotlin, constant.numeric.double.kotlin | #6897BB | — |
| keyword.operator.assignment.java, keyword.operator.arithmetic.java, keyword.operator.comparison.java, keyword.operator.logical.java, punctuation.separator.java, punctuation.terminator.java, keyword.operator.assignment.kotlin, keyword.operator.arithmetic.kotlin, keyword.operator.comparison.kotlin, keyword.operator.logical.kotlin, punctuation.separator.kotlin, punctuation.terminator.kotlin | #A9B7C6 | — |
| entity.name.function.java, meta.method-call.java entity.name.function.java | #A9B7C6 | — |
| meta.method.identifier.java entity.name.function, meta.method.identifier.java entity.name.function.java, entity.name.function.declaration.java, meta.function.kotlin entity.name.function, meta.function.kotlin entity.name.function.kotlin, entity.name.function.declaration.kotlin | #56A8F5 | — |
| variable.other.definition.java, variable.other.field.java, meta.class.body.java variable.other.java, variable.other.property.kotlin, variable.other.field.kotlin, meta.class.body.kotlin variable.other.kotlin | #9876AA | — |
| variable.parameter.java, variable.parameter.kotlin | #A9B7C6 | — |
| variable.other.constant.java, variable.other.constant.kotlin | #9876AA | italic |
| entity.name.type.type-parameter.java | #507874 | — |
| storage.type.generic.java | #A9B7C6 | — |
| punctuation.bracket.java, punctuation.section.java, punctuation.bracket.kotlin, punctuation.section.kotlin | #A9B7C6 | — |
| punctuation.definition.template-expression.begin.kotlin, punctuation.definition.template-expression.end.kotlin, variable.other.template.kotlin | #CC7832 | — |
| keyword.other.kotlin, storage.type.object.kotlin | #CC7832 | — |
| variable.language.this.java, variable.language.super.java, variable.language.this.kotlin, variable.language.super.kotlin | #CC7832 | — |
| keyword.kotlin, keyword.control.flow.kotlin, keyword.control.return.kotlin, keyword.control.exception.kotlin, keyword.control.loop.kotlin, keyword.control.conditional.kotlin | #CC7832 | — |
| entity.name.type.class.kotlin, entity.name.type.interface.kotlin, entity.name.type.enum.kotlin, entity.name.type.object.kotlin, support.type.kotlin, storage.type.class.kotlin | #A9B7C6 | — |
| entity.name.function.kotlin | #56A8F5 | — |
| string.template.kotlin, meta.template.expression.kotlin | #6A8759 | — |
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}!`;
}