Skip to main content
VS Code preview Full workbench mockup using this variant's colors and tokenColors.
colors Workbench UI color keys from the theme JSON colors map.
activityBar.activeBackground #2a263740 activityBar.activeBorder #6875E5 activityBar.background #201b2d activityBar.foreground #5dee9f activityBar.inactiveForeground #483c67 activityBarBadge.background #6875e5 tokenColors TextMate scopes and font styles (syntax highlighting rules).
scope foreground fontStyle comment, punctuation.definition.comment #68777D italic variable, string constant.other.placeholder, punctuation.definition.tag.end, punctuation.definition.tag.begin, punctuation.terminator.statement, punctuation.separator.comma, keyword.operator.rest, punctuation.definition.typeparameters.begin, punctuation.definition.typeparameters.end, meta.object-literal.key, text.html.derivative #EEFFFF — constant.other.color #ffffff — invalid, invalid.illegal #FF5370
Shiki preview TypeScript sample highlighted with this variant's colors and tokenColors.
Cosmos Theme — Cosmos Theme
activityBarBadge.foreground #e1e1e6
badge.background #6875e5
badge.foreground #e1e1e6
breadcrumb.activeSelectionForeground #e1e1e6
breadcrumb.background #191622
breadcrumb.focusForeground #e1e1e6
breadcrumb.foreground #483c67
breadcrumbPicker.background #15121e
button.background #2a2637
button.foreground #e1e1e6
contrastBorder #15121e
debugToolBar.background #13111b
diffEditor.insertedTextBackground #67e48020
diffEditor.removedTextBackground #e9637950
dropdown.background #201b2d
dropdown.border #15121e
dropdown.foreground #e1e1e6
editor.background #191622
editor.findMatchBackground #6272A4
editor.findMatchHighlightBackground #333b55
editor.findRangeHighlightBackground #333b55
editor.foldBackground #13111b
editor.foreground #e1e1e6
editor.hoverHighlightBackground #15121e
editor.lineHighlightBackground #201b2d
editor.lineHighlightBorder #191622
editor.rangeHighlightBackground #78d1e115
editor.selectionBackground #463d5c
editor.selectionHighlightBackground #252131
editor.snippetFinalTabstopHighlightBackground #191622
editor.snippetFinalTabstopHighlightBorder #5dee9f
editor.snippetTabstopHighlightBackground #191622
editor.snippetTabstopHighlightBorder #483c67
editor.wordHighlightBackground #988bc7
editor.wordHighlightStrongBackground #67e48050
editorCodeLens.foreground #483c67
editorError.foreground #f8768c
editorGroup.border #2a2637
editorGroup.dropBackground #44475a70
editorGroupHeader.tabsBackground #15121e
editorGutter.addedBackground #67e48080
editorGutter.deletedBackground #e9637980
editorGutter.modifiedBackground #988bc780
editorHoverWidget.background #191622
editorHoverWidget.border #483c67
editorIndentGuide.activeBackground #e1e1e645
editorIndentGuide.background #ffffff1a
editorLineNumber.foreground #483c67
editorLink.activeForeground #988bc7
editorMarkerNavigation.background #13111b
editorOverviewRuler.addedForeground #67e48080
editorOverviewRuler.border #15121e
editorOverviewRuler.currentContentForeground #67e480
editorOverviewRuler.deletedForeground #e9637980
editorOverviewRuler.errorForeground #e9637980
editorOverviewRuler.incomingContentForeground #78d1e1
editorOverviewRuler.infoForeground #988bc780
editorOverviewRuler.modifiedForeground #988bc780
editorOverviewRuler.selectionHighlightForeground #e89e64
editorOverviewRuler.warningForeground #e89e6480
editorOverviewRuler.wordHighlightForeground #988bc7
editorOverviewRuler.wordHighlightStrongForeground #67e480
editorRuler.foreground #ffffff1a
editorSuggestWidget.background #13111b
editorSuggestWidget.foreground #e1e1e6
editorSuggestWidget.selectedBackground #2a2637
editorWarning.foreground #988bc7
editorWhitespace.foreground #ffffff1a
editorWidget.background #13111b
errorForeground #e96379
extensionButton.prominentBackground #67e48090
extensionButton.prominentForeground #e1e1e6
extensionButton.prominentHoverBackground #67e48060
focusBorder #483c67
foreground #e1e1e6
gitDecoration.conflictingResourceForeground #e89e64
gitDecoration.deletedResourceForeground #e96379
gitDecoration.ignoredResourceForeground #483c67
gitDecoration.modifiedResourceForeground #988bc7
gitDecoration.untrackedResourceForeground #67e480
input.background #191622
input.border #15121e
input.foreground #e1e1e6
input.placeholderForeground #483c67
inputOption.activeBorder #78d1e1
inputValidation.errorBorder #e96379
inputValidation.infoBorder #ff79c6
inputValidation.warningBorder #e89e64
list.activeSelectionBackground #2a263760
list.activeSelectionForeground #e1e1e6
list.dropBackground #2a2637
list.errorForeground #e96379
list.focusBackground #44475a75
list.highlightForeground #988bc7
list.hoverBackground #2a263765
list.inactiveSelectionBackground #2a263740
list.warningForeground #e89e64
listFilterWidget.background #201b2d
listFilterWidget.noMatchesOutline #e96379
listFilterWidget.outline #252131
merge.currentHeaderBackground #67e48090
merge.incomingHeaderBackground #78d1e190
panel.background #191622
panel.border #ff79c6
panelTitle.activeBorder #ff79c6
panelTitle.activeForeground #e1e1e6
panelTitle.inactiveForeground #e1e1e680
peekView.border #2a2637
peekViewEditor.background #191622
peekViewEditor.matchHighlightBackground #e7de7980
peekViewResult.background #13111b
peekViewResult.fileForeground #e1e1e6
peekViewResult.lineForeground #e1e1e6
peekViewResult.matchHighlightBackground #e7de7980
peekViewResult.selectionBackground #2a2637
peekViewResult.selectionForeground #e1e1e6
peekViewTitle.background #15121e
peekViewTitleDescription.foreground #483c67
peekViewTitleLabel.foreground #e1e1e6
pickerGroup.border #78d1e1
pickerGroup.foreground #988bc7
progressBar.background #ff79c6
selection.background #78d1e1
settings.checkboxBackground #13111b
settings.checkboxBorder #15121e
settings.checkboxForeground #e1e1e6
settings.dropdownBackground #13111b
settings.dropdownBorder #15121e
settings.dropdownForeground #e1e1e6
settings.headerForeground #e1e1e6
settings.modifiedItemIndicator #e89e64
settings.numberInputBackground #13111b
settings.numberInputBorder #15121e
settings.numberInputForeground #e1e1e6
settings.textInputBackground #13111b
settings.textInputBorder #15121e
settings.textInputForeground #e1e1e6
sideBar.background #13111b
sideBarSectionHeader.background #191622
sideBarSectionHeader.border #15121e
sideBarTitle.foreground #e1e1e6
statusBar.background #15121e
statusBar.debuggingBackground #e96379
statusBar.debuggingForeground #15121e
statusBar.foreground #e1e1e6
statusBar.noFolderBackground #15121e
statusBar.noFolderForeground #e1e1e6
statusBarItem.prominentBackground #e96379
statusBarItem.prominentHoverBackground #e89e64
statusBarItem.remoteBackground #78d1e1
statusBarItem.remoteForeground #e1e1e6
tab.activeBackground #191622
tab.activeBorderTop #6875E5
tab.activeForeground #e1e1e6
tab.border #15121e
tab.inactiveBackground #13111b
tab.inactiveForeground #483c67
terminal.ansiBlack #201b2d
terminal.ansiBlue #84C7F8
terminal.ansiBrightBlack #6272A4
terminal.ansiBrightBlue #78d1e1
terminal.ansiBrightCyan #a4ffff
terminal.ansiBrightGreen #5DEE9F
terminal.ansiBrightMagenta #988bc7
terminal.ansiBrightRed #ed4556
terminal.ansiBrightWhite #f7f7fb
terminal.ansiBrightYellow #e7de79
terminal.ansiCyan #a1efe4
terminal.ansiGreen #67e480
terminal.ansiMagenta #988bc7
terminal.ansiRed #EF81C0
terminal.ansiWhite #e1e1e6
terminal.ansiYellow #e7de79
terminal.background #191622
terminal.border #EF81C0
terminal.foreground #e1e1e6
terminal.selectionBackground #483c6745
terminalCursor.background #201b2d
terminalCursor.foreground #e1e1e6
titleBar.activeBackground #13111b
titleBar.activeForeground #e1e1e6
titleBar.inactiveBackground #15121e
titleBar.inactiveForeground #483c67
walkThrough.embeddedEditorBackground #13111b keyword, storage.type, storage.modifier, keyword.other.template, keyword.other.substitution #6875E5 —
keyword.control.import, keyword.control, constant.other.color, entity.name.tag, punctuation.definition.tag, punctuation.separator.inheritance.php, punctuation.definition.tag.html, punctuation.definition.tag.begin.html, punctuation.definition.tag.end.html, punctuation.section.embedded #6875E5 —
support.class.component, keyword.operator.assignment, storage.type.function.arrow, meta.tag.sgml, markup.deleted.git_gutter, keyword.control.conditional, keyword.control.flow, keyword.operator.type.annotation, punctuation.accessor, entity.name.type.interface, entity.name.type, punctuation.terminator.rule, punctuation.separator.key-value, keyword.operator.arithmetic, variable.language.super #EF81C0 —
entity.name.function, meta.function-call, variable.function, support.function, keyword.other.special-method #5DEE9F —
meta.block variable.other, meta.jsx.children, punctuation.separator.parameter #EEFFFF —
support.other.variable, string.other.link #f07178 —
constant.numeric, constant.language, support.constant, constant.character, constant.escape, variable.parameter, keyword.other.unit, keyword.other #F78C6C —
string, constant.other.symbol, constant.other.key, entity.other.inherited-class, markup.heading, markup.inserted.git_gutter, meta.group.braces.curly constant.other.object.key.js string.unquoted.label.js #5DEE9F —
entity.name, support.type, support.class, support.orther.namespace.use.php, meta.use.php, support.other.namespace.php, markup.changed.git_gutter, support.type.sys-types, support.type.primitive, constant.numeric.decimal, meta.brace.square #84C7F8 —
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 #EF81C0 —
entity.name.module.js, variable.import.parameter.js, variable.other.class.js, #FF5370 —
variable.language #FF5370 italic
entity.name.method.js #82AAFF italic
meta.class-method.js entity.name.function.js, variable.function.constructor #82AAFF —
entity.other.attribute-name, entity.other.attribute-name.pseudo-class, punctuation.definition.parameters.begin #E9F373 —
text.html.basic entity.other.attribute-name.html, text.html.basic entity.other.attribute-name #FFCB6B italic
entity.other.attribute-name.class #FFCB6B —
source.sass keyword.control #82AAFF —
constant.character.escape #84C7F8 —
*url*, *link*, *uri* — underline
tag.decorator.js entity.name.tag.js, tag.decorator.js punctuation.definition.tag.js #6875E5 italic
source.js constant.other.object.key.js string.unquoted.label.js #FF5370 italic
source.json meta.structure.dictionary.json support.type.property-name.json #EF81C0 —
source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json #6875E5 —
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 #6272A4 —
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 #F15E5E —
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 #C17E70 —
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 #84C7F8 —
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 #E9F373 —
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 #EF81C0 —
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 meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json #6875E5 —
text.html.markdown, punctuation.definition.list_item.markdown #EEFFFF —
text.html.markdown markup.inline.raw.markdown, entity.name.section.markdown #EF81C0 —
text.html.markdown markup.inline.raw.markdown punctuation.definition.raw.markdown #68777D —
markdown.heading, markup.heading | markup.heading entity.name, markup.heading.markdown punctuation.definition.heading.markdown #5DEE9F —
markup.italic #f07178 italic
markup.bold, markup.bold string #f07178 bold
markup.bold markup.italic, markup.italic markup.bold, markup.quote markup.bold, markup.bold markup.italic string, markup.italic markup.bold string, markup.quote markup.bold string #6272A4 bold
markup.underline #5DEE9F underline
markup.quote punctuation.definition.blockquote.markdown #65737E —
string.other.link.title.markdown #82AAFF —
string.other.link.description.title.markdown #C792EA —
constant.other.reference.link.markdown #FFCB6B —
markup.raw.block.fenced.markdown #00000050 —
punctuation.definition.fenced.markdown #00000050 —
markup.raw.block.fenced.markdown, variable.language.fenced.markdown, punctuation.section.class.end #EEFFFF —
variable.language.fenced.markdown #65737E —
meta.separator #65737E bold
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 }!` ;
}
fetchUser.ts
index.ts
README.md
src
components
fetchUser.ts
src
components
fetchUser.ts
fetchUser 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Problems1
Output
Debug Console
Terminal
Ports
~/my-project $ pnpm dev
▲ Next.js ready on http://localhost:3000
✓ compiled client and server successfully in 412ms
wait - compiling /theme/vscode...
main*
Button.tsx
31
~/my-project
$
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 }!` ;
}
Cosmos Theme | Coding Theme