RLabs Themes Collection
A collection of VSCode themes made by RLabs Inc.
A collection of VSCode themes made by RLabs Inc.
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 | #ffffff | — |
| meta.selector | #d3b88e | — |
| token.info-token | #AFD8FF | — |
| token.warn-token | #d3b88e | — |
| token.error-token | #F44747 | — |
| token.debug-token | #FF869C | — |
| comment | #5a5a5a | — |
| comment.line | #5a5a5a | — |
| constant | #bbe6ff | — |
| entity | #ffffff | — |
| entity.name.function, entity.name.method | #cb96b7 | — |
| entity.name.type | #bbe6ff | — |
| entity.name.class | #d3b88e | — |
| entity.name.tag | #f4e1b3 | — |
| entity.other.inherited-class | #bbe6ff | — |
| entity.other.attribute-name | #e6e6e6 | — |
| meta.selector entity.other.attribute-name.class | #cb96b7 | — |
| entity.other.attribute-name.class | #99cebd | — |
| invalid | #ff7575 | — |
| keyword, keyword.operator | #d3b88e | — |
| keyword.control | #f4e1b3 | — |
| keyword.operator.assignment, keyword.operator.arithmetic, keyword.operator.pattern | #ffffff | — |
| keyword.operator.comparison, keyword.operator.increment, keyword.operator.logical, keyword.operator.relational, keyword.operator.spread, keyword.operator.ternary, keyword.control.conditional, keyword.control.loop, | #f4e1b3 | — |
| keyword.operator.new | #f4e1b3 | — |
| keyword.other.unit | #e6e6e6 | — |
| markup.underline | — | underline |
| markup.underline.link | #75ccff | underline |
| markup.bold | — | bold |
| markup.heading | #ffef75 | — |
| markup.italic | — | italic |
| markup.list | #d3b88e | — |
| markup.quote | #d3b88e | italic |
| markup.raw | #d3b88e | — |
| markup.other | #ff7575 | — |
| markup.changed | #ffba75 | — |
| markup.inserted | #75ffac | — |
| markup.deleted | #ff7575 | — |
| storage.type | #d3b88e | — |
| storage.type.function.arrow | #dfd6c8 | — |
| storage.modifier | #f4e1b3 | — |
| string | #ffffff | — |
| string.quoted.triple | #ffffff | — |
| string.quoted.other | #ffffff | — |
| string.regexp | #ffffff | — |
| string.interpolated | #ffffff | — |
| support.function | #a160af | — |
| support.class | #d3b88e | — |
| support.type, support.variable.property | #cb96b7 | — |
| support.type.property-name | #e6e6e6 | bold |
| support.constant | #99cebd | — |
| support.constant.handlebars | #D8C4AE | — |
| support.variable | #99cebd | — |
| support.other | #99cebd | — |
| variable | #99cebd | — |
| variable.parameter | #99cebd | — |
| variable.language | #99cebd | — |
| variable.other | #99cebd | — |
| variable.object.property | #e6e6e6 | — |
| variable.other.object.property | #e6e6e6 | — |
| variable.other.object, variable.other.constant.object | #99cebd | — |
| meta.import variable.other.readwrite, meta.object-binding-pattern-variable variable.object.property, meta.variable.assignment.destructured.object.coffee variable | #ffffff | — |
| meta.import variable.other.readwrite.alias , meta.export variable.other.readwrite.alias , meta.variable.assignment.destructured.object.coffee variable variable | #ffffff | — |
| constant.other.symbol.hashkey punctuation.definition.constant.ruby, entity.other.attribute-name.placeholder punctuation # Sass placeholder `%` symbols, entity.other.attribute-name.pseudo-class punctuation, entity.other.attribute-name.pseudo-element punctuation, meta.group.double.toml, meta.group.toml, meta.object-binding-pattern-variable punctuation.destructuring, punctuation.colon.graphql, punctuation.definition.block.scalar.folded.yaml, punctuation.definition.block.scalar.literal.yaml, punctuation.definition.block.sequence.item.yaml, punctuation.definition.entity.other.inherited-class, punctuation.function.swift, punctuation.separator.dictionary.key-value, punctuation.separator.hash, punctuation.separator.inheritance, punctuation.separator.key-value, punctuation.separator.key-value.mapping.yaml, punctuation.separator.namespace, punctuation.separator.pointer-access, punctuation.separator.slice, punctuation.separator.list, string.unquoted.heredoc punctuation.definition.string, support.other.chomping-indicator.yaml, punctuation.separator.annotation | #ffffff | — |
| keyword.operator.other.powershell # Commas, keyword.other.statement-separator.powershell, meta.function-call punctuation, punctuation.definition.arguments.begin, punctuation.definition.arguments.end, punctuation.definition.entity.begin, punctuation.definition.entity.end, punctuation.definition.tag.cs # HTML tags in comments, punctuation.definition.type.begin, punctuation.definition.type.end, punctuation.definition.tag, punctuation.definition.parameters.begin, punctuation.definition.parameters.end, punctuation.section.scope.begin, punctuation.section.scope.end, string.template meta.brace, string.template punctuation.accessor | #dfd6c8 | — |
| meta.string-contents.quoted.double punctuation.definition.variable, punctuation.definition.interpolation.begin, punctuation.definition.interpolation.end, punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded.begin, punctuation.section.embedded.coffee, punctuation.section.embedded.end, punctuation.section.embedded.end source.php # PHP edge case, punctuation.section.embedded.end source.ruby # Issue with ruby's tmLanguage, punctuation.definition.variable.makefile | #ffffff | — |
| meta.selectionset.graphql variable | #e6e6e6 | — |
| meta.selectionset.graphql meta.arguments variable | #f4e1b3 | — |
| support.type.graphql, support.type.builtin.graphql | #bbe6ff | — |
| meta.arguments.graphql variable.parameter.graphql | #cb96b7 | — |
| meta.arguments.graphql variable.graphql | #99cebd | — |
| entity.name.fragment.graphql, variable.fragment.graphql | #ffffff | — |
| log.error | #ff7575 | bold |
| log.warning | #d3b88e | bold |
| entity.name.function.target.makefile, entity.name.section.toml, entity.name.tag.yaml, variable.other.key.toml | #d3b88e | — |
| constant.other.date, constant.other.timestamp | #ffffff | — |
| variable.other.alias.yaml | #ffffff | — |
| string.regexp, constant.other.character-class.set.regexp, constant.character.escape.backslash.regexp | #F3E9D2 | — |
| punctuation.definition.group.capture.regexp | #d3b88e | — |
| string.regexp punctuation.definition.string.begin, string.regexp punctuation.definition.string.end | #DAF8D4 | — |
| punctuation.definition.character-class.regexp | #AFD8FF | — |
| punctuation.definition.group.regexp | #FF869C | — |
| punctuation.definition.group.assertion.regexp, keyword.operator.negation.regexp | #F3E9D2 | — |
| meta.assertion.look-ahead.regexp | #d3b88e | — |
| meta.scope.prerequisites.makefile | #d3b88e | — |
| source.json meta.structure.dictionary.json support.type.property-name.json | #d3b88e | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #FFB794 | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #F3E9D2 | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #FF869C | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #bbdeee | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #FFB794 | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #C7C6C9 | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #AEAEAE | — |
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 |
|---|---|---|
| meta.tag, string | #FFFFFF | — |
| meta.diff, meta.diff.header | #D6D2DA | — |
| meta.link.reference.def.restructuredtext, string.other.link.description, string.other.link.title | #A6D9F7 | — |
| emphasis | — | italic |
| strong | — | bold |
| invalid | #FF8686 | strikethrough |
| invalid.deprecated | #f7f5f7 | underline italic |
| header | #A6D9F7 | — |
| source.ini, source.ignore, source | #d6d6d6 | — |
| markup.inserted | #A6D9F7 | — |
| markup.deleted | #FF8686 | — |
| markup.changed | #8AFFD2 | — |
| markup.error | #FF8686 | — |
| markup.underline | — | underline |
| markup.bold | #FFC59E | bold |
| markup.heading | #8AFFD2 | bold |
| markup.italic | #FFEFB7 | italic |
| markup.inline.raw, markup.raw.restructuredtext | #F1CDE9 | — |
| markup.underline.link, markup.underline.link.image, markup.quote | #FFEFB7 | — |
| beginning.punctuation.definition.list.markdown, beginning.punctuation.definition.quote.markdown, punctuation.definition.link.restructuredtext | #F1CDE9 | — |
| meta.separator.markdown | #D6D2DA | — |
| fenced_code.block.language, markup.raw.inner.restructuredtext, markup.fenced_code.block.markdown punctuation.definition.markdown | #FFBCEF | — |
| markup.heading.markdown punctuation.definition.string.begin, markup.heading.markdown punctuation.definition.string.end | #FFC59E | — |
| entity.name.filename | #FFEFB7 | — |
| entity.name.directive.restructuredtext | #FFEFB7 | italic |
| entity.name.class, entity.name.type.class, entity.other.inherited-class, entity.name.fragment.graphql, variable.fragment.graphql | #FFC59E | — |
| entity.name.tag | #FFBCEF | — |
| entity.other.attribute-name.parent-selector | #8AFFD2 | — |
| entity.other.attribute-name, meta.object-literal.key.js | #FFE7CC | — |
| entity.name.function, meta.function-call.generic, meta.function-call.object, meta.function-call.php, meta.function-call.static, meta.method-call.java meta.method, meta.method.groovy, support.function.any-method.lua, keyword.operator.function.infix | #E4D6A7 | — |
| source.css, entity.other.attribute-name.class.css, entity.name.variable.parameter, meta.selector.css, meta.at-rule.function variable, meta.at-rule.mixin variable, meta.function.arguments variable.other.php, meta.selectionset.graphql meta.arguments.graphql variable.arguments.graphql | #dfdfdf | — |
| support, entity.name.type, entity.other.attribute-name.pseudo-class.css, entity.other.attribute-name.pseudo-element.css | #F1CDE9 | — |
| entity.name.function.target.makefile, entity.name.section.toml, entity.name.tag.yaml, variable.other.key.toml | #8AFFD2 | — |
| entity.name.type.type-parameter, meta.indexer.mappedtype.declaration entity.name.type, meta.type.parameters entity.name.type | #FFC59E | — |
| entity.other.attribute-name, meta.object-literal.key.js | #8AFFD2 | — |
| source.css support.type.property-name, source.sass support.type.property-name, source.scss support.type.property-name, source.less support.type.property-name, source.stylus support.type.property-name, source.postcss support.type.property-name | #FFBCEF | — |
| entity.name.type, keyword.primitive-datatypes.swift, keyword.type.cs, meta.protocol-list.objc, meta.return-type.objc, source.go storage.type, source.groovy storage.type, source.java storage.type, source.powershell entity.other.attribute-name, storage.class.std.rust, storage.type.attribute.swift, storage.type.c, storage.type.core.rust, storage.type.cs, storage.type.groovy, storage.type.objc, storage.type.php, storage.type.haskell, storage.type.ocaml | #FFE692 | — |
| storage.modifier | #8AFFD2 | — |
| punctuation.definition.constant.restructuredtext | #FFC59E | — |
| storage.type.generic.java | #DDDDDD | — |
| storage, meta.implementation storage.type.objc, meta.interface-or-protocol storage.type.objc, source.groovy storage.type.def, support.variable.property.js | #8AFFD2 | — |
| comment, punctuation.definition.comment, unused.comment, wildcard.comment | #725c72 | — |
| comment keyword.codetag.notation, comment.block.documentation keyword, comment.block.documentation storage.type.class | #725c72 | — |
| constant | #96D8FF | — |
| constant.other.color, constant.other.key.perl | #FFC59E | — |
| constant.character.escape, constant.character.string.escape, constant.regexp, constant.language | #F1CDE9 | — |
| constant.other.date, constant.other.timestamp | #96D8FF | — |
| constant.language.empty-list.haskell, constant.other.symbol.hashkey, constant.other.symbol.hashkey.ruby | #f7f5f7 | — |
| keyword.operator.other.powershell, keyword.other.statement-separator.powershell | #DDDDDD | — |
| keyword.operator.dereference.java, keyword.operator.navigation.groovy | #f7f5f7 | — |
| keyword.operator | #FFFFFF | — |
| keyword.other.unit | #d8e0e7 | — |
| keyword.control, keyword.other.template, keyword.other.substitution | #CCCCCC | — |
| keyword.expressions-and-types.swift, keyword.other.this | #FFC59E | — |
| keyword.control.import, keyword.control.from, keyword.control.export | #63D5A9 | — |
| keyword.control.new, keyword.operator.new | #8AFFD2 | — |
| meta.attribute-selector.scss | #FFEFB7 | — |
| keyword.other.important.css, support.variable.property, keyword.control.flow, keyword.control.loop, keyword.control.conditional, keyword.operator.logical, keyword.operator.relational, keyword.operator.comparison, keyword.operator.ternary | #63D5A9 | — |
| keyword.control.at-rule.apply.tailwind | #8AFFD2 | bold |
| meta.selector | #FFCBA6 | — |
| meta.at-rule.apply.tailwind | #D3F7D3 | — |
| keyword.primitive-datatypes.swift, keyword.type.cs, meta.protocol-list.objc, meta.return-type.objc, source.powershell entity.other.attribute-name | #FFC59E | — |
| punctuation.definition.string.begin, punctuation.definition.string.end, punctuation.support.type.property-name.begin, punctuation.support.type.property-name.end | #CED5E0 | — |
| string.quoted.docstring.multi, string.quoted.docstring.multi.python punctuation.definition.string.begin, string.quoted.docstring.multi.python punctuation.definition.string.end, string.quoted.docstring.multi.python constant.character.escape | #CED8CE | — |
| punctuation.definition.keyword.css | #DCDCDC | bold |
| punctuation.definition.attribute-selector.end.bracket.square.scss, punctuation.definition.attribute-selector.begin.bracket.square.scss | #f7f5f7 | — |
| punctuation, punctuation.definition.tag, punctuation.separator.inheritance.php, punctuation.definition.tag.html, punctuation.definition.tag.begin.html, punctuation.definition.tag.end.html, punctuation.section.embedded | #DCDCDC | — |
| punctuation.definition.constant.ruby, entity.other.attribute-name.placeholder punctuation, entity.other.attribute-name.pseudo-class punctuation, entity.other.attribute-name.pseudo-element punctuation, meta.group.double.toml, meta.brace.square, meta.group.toml, meta.object-binding-pattern-variable punctuation.destructuring, punctuation.colon.graphql, punctuation.definition.block.scalar.folded.yaml, punctuation.definition.block.scalar.literal.yaml, punctuation.definition.block.sequence.item.yaml, punctuation.definition.entity.other.inherited-class, punctuation.function.swift, punctuation.separator.dictionary.key-value, punctuation.separator.hash, punctuation.separator.inheritance, punctuation.separator.key-value, punctuation.separator.key-value.mapping.yaml, punctuation.separator.namespace, punctuation.separator.pointer-access, punctuation.separator.slice, string.unquoted.heredoc punctuation.definition.string, support.other.chomping-indicator.yaml, punctuation.separator.annotation | #FFFFFF | — |
| meta.brace.round, meta.function-call punctuation, punctuation.definition.arguments.begin, punctuation.definition.arguments.end, punctuation.definition.entity.begin, punctuation.definition.entity.end, punctuation.definition.tag.cs, punctuation.definition.type.begin, punctuation.definition.type.end, punctuation.section.scope.begin, punctuation.section.scope.end, string.template meta.brace, string.template punctuation.accessor | #DDDDDD | — |
| meta.string-contents.quoted.double punctuation.definition.variable, punctuation.definition.interpolation.begin, punctuation.definition.interpolation.end, punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded.begin, punctuation.section.embedded.coffee, punctuation.section.embedded.end, punctuation.section.embedded.end source.php, punctuation.section.embedded.end source.ruby, punctuation.definition.variable.makefile | #E2E2E2 | — |
| meta.scope.for-loop.shell punctuation.definition.string.begin, meta.scope.for-loop.shell punctuation.definition.string.end, meta.scope.for-loop.shell string, punctuation.section.embedded.begin.tsx, punctuation.section.embedded.end.tsx, punctuation.section.embedded.begin.jsx, punctuation.section.embedded.end.jsx, punctuation.separator.list.comma.css | #f7f5f7 | — |
| punctuation.definition.directive.restructuredtext | #A6D9F7 | — |
| punctuation.separator.inheritance.php | #FFBCEF | — |
| variable.other.alias.yaml | #8AFFD2 | underline |
| variable.language, variable.language punctuation.definition.variable.php, variable.other.readwrite.instance.ruby, variable.parameter.function.language.special, variable.other.constant | #FFBCEF | — |
| variable.object.property, variable.other.object.property | #DFDFDF | — |
| variable.other.object | #FFCBA6 | — |
| meta.import variable.other.readwrite, meta.object-binding-pattern-variable variable.object.property, meta.variable.assignment.destructured.object.coffee variable | #FFC59E | — |
| meta.import variable.other.readwrite.alias, meta.export variable.other.readwrite.alias, meta.variable.assignment.destructured.object.coffee variable variable, variable.other.readwrite.js | #D6D6D6 | — |
| meta.selectionset.graphql meta.arguments variable | #FFC59E | — |
| variable.graphql | #DFDFDF | — |
| support.variable.property, keyword.operation.graphql | #FFC59E | — |
| source.shell variable.other | #F1CDE9 | — |
| support.function.magic, support.variable, variable.other.predefined, storage.modifier.async | #FFC59E | — |
| support.function, support.type.property-name | #A6D9F7 | — |
| string.regexp, constant.other.character-class.set.regexp, constant.character.escape.backslash.regexp | #FFEFB7 | — |
| punctuation.definition.group.capture.regexp | #FFBCEF | — |
| string.regexp punctuation.definition.string.begin, string.regexp punctuation.definition.string.end | #8AFFD2 | — |
| punctuation.definition.character-class.regexp | #FFC59E | — |
| punctuation.definition.group.regexp | #F1CDE9 | — |
| punctuation.definition.group.assertion.regexp, keyword.operator.negation.regexp | #FFEFB7 | — |
| meta.assertion.look-ahead.regexp | #8AFFD2 | — |
| meta.scope.prerequisites.makefile | #FFEFB7 | — |
| source.json meta.structure.dictionary.json support.type.property-name.json | #8AFFD2 | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #F1CDE9 | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #FFEFB7 | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #F1A9A7 | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #EEAEB0 | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #FF9797 | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #C7C6C9 | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #C7C7C7 | — |
| token.info-token | #ABC8FD | — |
| token.warn-token | #FFC697 | — |
| token.error-token | #F44747 | — |
| token.debug-token | #FFFFC2 | — |
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 |
|---|---|---|
| meta.tag, string | #FFFFFF | — |
| meta.diff, meta.diff.header | #737175 | — |
| meta.link.reference.def.restructuredtext, string.other.link.description, string.other.link.title | #A6D9F7 | — |
| emphasis | — | italic |
| strong | — | bold |
| invalid | #C26B6B | strikethrough |
| invalid.deprecated | #f7f5f7 | underline italic |
| header | #A6D9F7 | — |
| source.ini, source.ignore, source | #d6d6d6 | — |
| markup.inserted | #A6D9F7 | — |
| markup.deleted | #C26B6B | — |
| markup.changed | #6bc2a1 | — |
| markup.error | #C26B6B | — |
| markup.underline | — | underline |
| markup.bold | #D69971 | bold |
| markup.heading | #6bc2a1 | bold |
| markup.italic | #E2D4A2 | italic |
| markup.inline.raw, markup.raw.restructuredtext | #AC92A6 | — |
| markup.underline.link, markup.underline.link.image, markup.quote | #E2D4A2 | — |
| beginning.punctuation.definition.list.markdown, beginning.punctuation.definition.quote.markdown, punctuation.definition.link.restructuredtext | #AC92A6 | — |
| meta.separator.markdown | #737175 | — |
| fenced_code.block.language, markup.raw.inner.restructuredtext, markup.fenced_code.block.markdown punctuation.definition.markdown | #b86fa7 | — |
| markup.heading.markdown punctuation.definition.string.begin, markup.heading.markdown punctuation.definition.string.end | #D69971 | — |
| entity.name.filename | #E2D4A2 | — |
| entity.name.directive.restructuredtext | #E2D4A2 | italic |
| entity.name.class, entity.name.type.class, entity.other.inherited-class, entity.name.fragment.graphql, variable.fragment.graphql | #D69971 | — |
| entity.name.tag | #b86fa7 | — |
| entity.other.attribute-name.parent-selector | #6bc2a1 | — |
| entity.other.attribute-name, meta.object-literal.key.js | #c4b19d | — |
| entity.name.function, meta.function-call.generic, meta.function-call.object, meta.function-call.php, meta.function-call.static, meta.method-call.java meta.method, meta.method.groovy, support.function.any-method.lua, keyword.operator.function.infix | #E4D6A7 | — |
| source.css, entity.other.attribute-name.class.css, entity.name.variable.parameter, meta.selector.css, meta.at-rule.function variable, meta.at-rule.mixin variable, meta.function.arguments variable.other.php, meta.selectionset.graphql meta.arguments.graphql variable.arguments.graphql | #dfdfdf | — |
| support, entity.name.type, entity.other.attribute-name.pseudo-class.css, entity.other.attribute-name.pseudo-element.css | #AC92A6 | — |
| entity.name.function.target.makefile, entity.name.section.toml, entity.name.tag.yaml, variable.other.key.toml | #6bc2a1 | — |
| entity.name.type.type-parameter, meta.indexer.mappedtype.declaration entity.name.type, meta.type.parameters entity.name.type | #D69971 | — |
| entity.other.attribute-name, meta.object-literal.key.js | #6bc2a1 | — |
| source.css support.type.property-name, source.sass support.type.property-name, source.scss support.type.property-name, source.less support.type.property-name, source.stylus support.type.property-name, source.postcss support.type.property-name | #b86fa7 | — |
| entity.name.type, keyword.primitive-datatypes.swift, keyword.type.cs, meta.protocol-list.objc, meta.return-type.objc, source.go storage.type, source.groovy storage.type, source.java storage.type, source.powershell entity.other.attribute-name, storage.class.std.rust, storage.type.attribute.swift, storage.type.c, storage.type.core.rust, storage.type.cs, storage.type.groovy, storage.type.objc, storage.type.php, storage.type.haskell, storage.type.ocaml | #D3BD73 | — |
| storage.modifier | #6bc2a1 | — |
| punctuation.definition.constant.restructuredtext | #D69971 | — |
| storage.type.generic.java | #ADADAD | — |
| storage, meta.implementation storage.type.objc, meta.interface-or-protocol storage.type.objc, source.groovy storage.type.def, support.variable.property.js | #6bc2a1 | — |
| comment, punctuation.definition.comment, unused.comment, wildcard.comment | #737175 | — |
| comment keyword.codetag.notation, comment.block.documentation keyword, comment.block.documentation storage.type.class | #6bc2a1 | — |
| constant | #6c9fbd | — |
| constant.other.color, constant.other.key.perl | #D69971 | — |
| constant.character.escape, constant.character.string.escape, constant.regexp, constant.language | #AC92A6 | — |
| constant.other.date, constant.other.timestamp | #6c9fbd | — |
| constant.language.empty-list.haskell, constant.other.symbol.hashkey, constant.other.symbol.hashkey.ruby | #f7f5f7 | — |
| keyword.operator.other.powershell, keyword.other.statement-separator.powershell | #ADADAD | — |
| keyword.operator.dereference.java, keyword.operator.navigation.groovy | #f7f5f7 | — |
| keyword.operator | #FFFFFF | — |
| keyword.other.unit | #d8e0e7 | — |
| keyword.control, keyword.other.template, keyword.other.substitution | #8F8F8F | — |
| keyword.expressions-and-types.swift, keyword.other.this | #D69971 | — |
| keyword.control.import, keyword.control.from, keyword.control.export | #358265 | — |
| keyword.control.new, keyword.operator.new | #6bc2a1 | — |
| meta.attribute-selector.scss | #E2D4A2 | — |
| keyword.other.important.css, support.variable.property, keyword.control.flow, keyword.control.loop, keyword.control.conditional, keyword.operator.logical, keyword.operator.relational, keyword.operator.comparison, keyword.operator.ternary | #358265 | — |
| keyword.control.at-rule.apply.tailwind | #6bc2a1 | bold |
| meta.selector | #DEB191 | — |
| meta.at-rule.apply.tailwind | #657465 | — |
| keyword.primitive-datatypes.swift, keyword.type.cs, meta.protocol-list.objc, meta.return-type.objc, source.powershell entity.other.attribute-name | #D69971 | — |
| punctuation.definition.string.begin, punctuation.definition.string.end, punctuation.support.type.property-name.begin, punctuation.support.type.property-name.end | #CED5E0 | — |
| string.quoted.docstring.multi, string.quoted.docstring.multi.python punctuation.definition.string.begin, string.quoted.docstring.multi.python punctuation.definition.string.end, string.quoted.docstring.multi.python constant.character.escape | #A0A7A0 | — |
| punctuation.definition.keyword.css | #8F8F8F | bold |
| punctuation.definition.attribute-selector.end.bracket.square.scss, punctuation.definition.attribute-selector.begin.bracket.square.scss | #f7f5f7 | — |
| punctuation, punctuation.definition.tag, punctuation.separator.inheritance.php, punctuation.definition.tag.html, punctuation.definition.tag.begin.html, punctuation.definition.tag.end.html, punctuation.section.embedded | #8F8F8F | — |
| punctuation.definition.constant.ruby, entity.other.attribute-name.placeholder punctuation, entity.other.attribute-name.pseudo-class punctuation, entity.other.attribute-name.pseudo-element punctuation, meta.group.double.toml, meta.brace.square, meta.group.toml, meta.object-binding-pattern-variable punctuation.destructuring, punctuation.colon.graphql, punctuation.definition.block.scalar.folded.yaml, punctuation.definition.block.scalar.literal.yaml, punctuation.definition.block.sequence.item.yaml, punctuation.definition.entity.other.inherited-class, punctuation.function.swift, punctuation.separator.dictionary.key-value, punctuation.separator.hash, punctuation.separator.inheritance, punctuation.separator.key-value, punctuation.separator.key-value.mapping.yaml, punctuation.separator.namespace, punctuation.separator.pointer-access, punctuation.separator.slice, string.unquoted.heredoc punctuation.definition.string, support.other.chomping-indicator.yaml, punctuation.separator.annotation | #FFFFFF | — |
| meta.brace.round, meta.function-call punctuation, punctuation.definition.arguments.begin, punctuation.definition.arguments.end, punctuation.definition.entity.begin, punctuation.definition.entity.end, punctuation.definition.tag.cs, punctuation.definition.type.begin, punctuation.definition.type.end, punctuation.section.scope.begin, punctuation.section.scope.end, string.template meta.brace, string.template punctuation.accessor | #ADADAD | — |
| meta.string-contents.quoted.double punctuation.definition.variable, punctuation.definition.interpolation.begin, punctuation.definition.interpolation.end, punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded.begin, punctuation.section.embedded.coffee, punctuation.section.embedded.end, punctuation.section.embedded.end source.php, punctuation.section.embedded.end source.ruby, punctuation.definition.variable.makefile | #868686 | — |
| meta.scope.for-loop.shell punctuation.definition.string.begin, meta.scope.for-loop.shell punctuation.definition.string.end, meta.scope.for-loop.shell string, punctuation.section.embedded.begin.tsx, punctuation.section.embedded.end.tsx, punctuation.section.embedded.begin.jsx, punctuation.section.embedded.end.jsx, punctuation.separator.list.comma.css | #f7f5f7 | — |
| punctuation.definition.directive.restructuredtext | #9CB0C5 | — |
| punctuation.separator.inheritance.php | #b86fa7 | — |
| variable.other.alias.yaml | #6bc2a1 | underline |
| variable.language, variable.language punctuation.definition.variable.php, variable.other.readwrite.instance.ruby, variable.parameter.function.language.special, variable.other.constant | #b86fa7 | — |
| variable.object.property, variable.other.object.property | #acacac | — |
| variable.other.object | #DEB191 | — |
| meta.import variable.other.readwrite, meta.object-binding-pattern-variable variable.object.property, meta.variable.assignment.destructured.object.coffee variable | #D69971 | — |
| meta.import variable.other.readwrite.alias, meta.export variable.other.readwrite.alias, meta.variable.assignment.destructured.object.coffee variable variable, variable.other.readwrite.js | #bdbcbc | — |
| meta.selectionset.graphql meta.arguments variable | #D69971 | — |
| variable.graphql | #acacac | — |
| support.variable.property, keyword.operation.graphql | #D69971 | — |
| source.shell variable.other | #AC92A6 | — |
| support.function.magic, support.variable, variable.other.predefined, storage.modifier.async | #D69971 | — |
| support.function, support.type.property-name | #A6D9F7 | — |
| string.regexp, constant.other.character-class.set.regexp, constant.character.escape.backslash.regexp | #E2D4A2 | — |
| punctuation.definition.group.capture.regexp | #b86fa7 | — |
| string.regexp punctuation.definition.string.begin, string.regexp punctuation.definition.string.end | #6bc2a1 | — |
| punctuation.definition.character-class.regexp | #D69971 | — |
| punctuation.definition.group.regexp | #AC92A6 | — |
| punctuation.definition.group.assertion.regexp, keyword.operator.negation.regexp | #E2D4A2 | — |
| meta.assertion.look-ahead.regexp | #6bc2a1 | — |
| meta.scope.prerequisites.makefile | #E2D4A2 | — |
| source.json meta.structure.dictionary.json support.type.property-name.json | #6bc2a1 | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #AC92A6 | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #E2D4A2 | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #F1A9A7 | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #DEA6A8 | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #FF9797 | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #C7C6C9 | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #757575 | — |
| token.info-token | #ABC8FD | — |
| token.warn-token | #FFFFC2 | — |
| token.error-token | #F44747 | — |
| token.debug-token | #FFC697 | — |
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 |
|---|---|---|
| meta.tag, string | #ECE0DF | — |
| meta.diff, meta.diff.header | #4C5A42 | — |
| meta.link.reference.def.restructuredtext, string.other.link.description, string.other.link.title | #F3DCD3 | — |
| emphasis | — | italic |
| strong | — | bold |
| invalid | #E76464 | strikethrough |
| invalid.deprecated | #ECE0DF | underline italic |
| header | #F3DCD3 | — |
| source.ini, source.ignore, source | #DCC7C1 | — |
| markup.inserted | #F3DCD3 | — |
| markup.deleted | #E76464 | — |
| markup.changed | #6FA6DC | — |
| markup.error | #E76464 | — |
| markup.underline | — | underline |
| markup.bold | #E2A66A | bold |
| markup.heading | #E46C4E | bold |
| markup.italic | #DCC7C1 | italic |
| markup.inline.raw, markup.raw.restructuredtext | #E46C4E | — |
| markup.underline.link, markup.underline.link.image, markup.quote | #6FA6DC | — |
| beginning.punctuation.definition.list.markdown, beginning.punctuation.definition.quote.markdown, punctuation.definition.link.restructuredtext | #E2826A | — |
| meta.separator.markdown | #E46C4E | — |
| fenced_code.block.language, markup.raw.inner.restructuredtext, markup.fenced_code.block.markdown punctuation.definition.markdown | #EED4C9 | — |
| markup.heading.markdown punctuation.definition.string.begin, markup.heading.markdown punctuation.definition.string.end | #E2A66A | — |
| entity.name.class, entity.name.type.class, entity.other.inherited-class | #E2826A | — |
| entity.name.tag, entity.other.attribute-name.parent-selector | #D9EFC8 | — |
| entity.other.attribute-name | #E2826A | — |
| entity.name.function, meta.function-call, meta.method-call, meta.method | #E46C4E | — |
| meta.selector.css, meta.at-rule.function variable, meta.at-rule.mixin variable, variable.parameter, entity.name.variable.parameter | #E3CCB5 | — |
| support | #E5A69F | — |
| entity.name, variable.other.key | #E46C4E | — |
| entity.name.type | #E7C1B1 | — |
| entity.name.type.module, entity.name.type.type-parameter, meta.indexer.mappedtype.declaration entity.name.type, meta.type.parameters entity.name.type | #E2CBA7 | — |
| entity.other.attribute-name, entity.other.attribute-name.pseudo-class.css | #F0E0D6 | — |
| entity.other.attribute-name.class.css | #E46C4E | — |
| storage.class, storage.type | #E2826A | — |
| storage.modifier | #EBCAC2 | — |
| comment, punctuation.definition.comment, unused.comment, wildcard.comment | #4C5A42 | — |
| constant | #F3DCD3 | — |
| constant.other.color | #E8C6B0 | — |
| constant.character.escape, constant.character.string.escape, constant.regexp, constant.language | #E2AF8D | — |
| constant.other.date, constant.other.timestamp | #ECD2C1 | — |
| keyword.operator | #E8D1CF | — |
| keyword.other.unit | #E3A7A0 | — |
| keyword.control, keyword.other.template, keyword.other.substitution | #BAE49B | — |
| keyword.other.this | #F3DCD3 | — |
| keyword.control.import, keyword.control.from | #C1DFB9 | — |
| keyword.control.new, keyword.operator.new, keyword.other.important.css | #E2826A | — |
| keyword.control.flow, keyword.control.loop, keyword.control.conditional, keyword.operator.logical, keyword.operator.relational, keyword.operator.comparison, keyword.operator.ternary | #B2E7AC | — |
| meta.attribute-selector.scss | #EFDECC | — |
| entity.name.tag.css, entity.name.tag.less, entity.name.tag.custom.css | #D9EFC8 | — |
| entity.name.tag.wildcard.css, entity.name.tag.wildcard.less, entity.name.tag.wildcard.scss, entity.name.tag.wildcard.sass | #CFECC6 | — |
| source.css support.type.property-name, source.sass support.type.property-name, source.scss support.type.property-name, source.less support.type.property-name, source.stylus support.type.property-name, source.postcss support.type.property-name | #E2826A | — |
| support.constant.property-value.css, constant.numeric.css | #DCC7C1 | — |
| keyword.control.at-rule.apply.tailwind | #C1DFB9 | — |
| keyword.control.at-rule.tailwind.tailwind | #BAE49B | — |
| keyword.control.at-rule.layer.tailwind | #B2E7AC | — |
| meta.selector | #EFDECC | — |
| punctuation.definition.string.begin, punctuation.definition.string.end, punctuation.support.type.property-name.begin, punctuation.support.type.property-name.end | #EDE4E3 | — |
| punctuation.definition.constant.restructuredtext | #F3DCD3 | — |
| string.quoted.docstring.multi | #E46C4E | — |
| punctuation.definition.keyword.css, punctuation.section.property-list.begin.bracket.curly.css, punctuation.section.property-list.end.bracket.curly.css, punctuation.definition.attribute-selector.end.bracket.square.scss, punctuation.definition.attribute-selector.begin.bracket.square.scss | #EDE4E3 | — |
| punctuation, punctuation.definition.tag, punctuation.definition.tag.html, punctuation.definition.tag.begin.html, punctuation.definition.tag.end.html | #CFECC6 | — |
| entity.other.attribute-name punctuation, meta.brace.square, meta.group.toml, meta.group.double.toml, punctuation.definition.block.scalar.folded.yaml, punctuation.definition.block.scalar.literal.yaml, punctuation.definition.block.sequence.item.yaml, punctuation.separator | #F3F2EB | — |
| meta.brace.round, meta.function-call punctuation, punctuation.definition.arguments.begin, punctuation.definition.arguments.end, punctuation.definition.entity.begin, punctuation.definition.entity.end, punctuation.definition.type.begin, punctuation.definition.type.end, punctuation.section.scope.begin, punctuation.section.scope.end | #E2D9D4 | — |
| meta.string-contents.quoted.double punctuation.definition.variable, punctuation.definition.interpolation.begin, punctuation.definition.interpolation.end, punctuation.definition.template-expression.begin, punctuation.definition.template-expression.end, punctuation.section.embedded.begin, punctuation.section.embedded.end, punctuation.definition.variable.makefile | #EBE3E0 | — |
| punctuation.section.embedded.begin.tsx, punctuation.section.embedded.end.tsx, punctuation.section.embedded.begin.jsx, punctuation.section.embedded.end.jsx, punctuation.separator.list.comma.css | #EFE8E6 | — |
| punctuation.definition.directive.restructuredtext | #F3DCD3 | — |
| variable | #CEE6BC | — |
| variable.other.alias.yaml | #CEE6BC | underline |
| variable.language, variable.parameter.function.language.special | #E2AF8D | — |
| variable.other.constant | #D3EFD2 | — |
| support.variable | #CEE6BC | — |
| variable.other.property, support.variable.property, variable.object.property, variable.other.object.property | #BFE3BA | — |
| support.function.magic, variable.other.predefined, storage.modifier.async, keyword.control.trycatch, keyword.control.trycatch.js, keyword.control.trycatch.ts | #E2A66A | — |
| support.function, support.type.property-name | #EDE2C9 | — |
| storage | #EDC9C5 | — |
| string.regexp, constant.other.character-class.set.regexp, constant.character.escape.backslash.regexp | #CD9115 | — |
| punctuation.definition.group.capture.regexp | #CA5C70 | — |
| string.regexp punctuation.definition.string.begin, string.regexp punctuation.definition.string.end | #CA5C70 | — |
| punctuation.definition.character-class.regexp | #FFDC93 | — |
| punctuation.definition.group.regexp | #EEE5FF | — |
| punctuation.definition.group.assertion.regexp, keyword.operator.negation.regexp | #CA5C70 | — |
| meta.assertion.look-ahead.regexp | #EEE5FF | — |
| source.json meta.structure.dictionary.json support.type.property-name.json | #E46C4E | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #E2826A | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #6FA6DC | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #E2A66A | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #E76464 | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #2E9E2E | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #E46C4E | — |
| source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json | #E2826A | — |
| token.info-token | #6FA6DC | — |
| token.warn-token | #E2A66A | — |
| token.error-token | #E76464 | — |
| token.debug-token | #E2A66A | — |
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}!`;
}
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}!`;
}