C/C++ Themes
UI Themes for C/C++ extension.
UI Themes for C/C++ extension.
Full workbench mockup using this variant's colors and tokenColors.
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}!`;
}
C/C++ Themes ships with Microsoft's C/C++ extension for VS Code. Semantic colorization added tokens for macros, types, and members. Those tokens had no TextMate scope. Older themes could not color them. This pack follows the Visual Studio light and dark themes. It also keeps the 2017 variants. It later added colors for VS Code semantic tokens. You get four themes: Dark, Light, 2017 Dark, and 2017 Light.
Dark uses background #1E1E1E and text #DADADA. Comments are #57A64A. Control-flow keywords are #D8A0DF. Strings are #CE9178. Functions are #DCDCAA. Types are #4EC9B0. Variables are #9CDCFE. Teal types and yellow functions sit apart from blue keywords.
2017 Dark is closer to the older Visual Studio look. Keywords are #569CD6. Functions and variables are gray. Preprocessor macros are #BD63C5.
Light uses a white background and black text. Comments are #008000. Keywords are #0000FF. Strings are #A31515. Functions are #74531F. Types are #267F99.
Workbench UI color keys from the theme JSON colors map.
| key | HEX | RGB | RGBA |
|---|---|---|---|
activityBarBadge.background | |||
editor.background | |||
editor.foreground | |||
editor.inactiveSelectionBackground | |||
editor.selectionHighlightBackground | |||
editorIndentGuide.activeBackground | |||
editorIndentGuide.background | |||
editorLineNumber.activeForeground | |||
editorLineNumber.foreground | |||
editorSuggestWidget.background | |||
editorWhitespace.foreground | |||
input.placeholderForeground | |||
list.activeSelectionIconForeground | |||
list.focusAndSelectionOutline | |||
list.hoverBackground | |||
notebook.cellBorderColor | |||
notebook.selectedCellBackground | |||
ports.iconRunningProcessForeground | |||
searchEditor.textInputBorder | |||
settings.numberInputBorder | |||
settings.textInputBorder | |||
sideBarSectionHeader.background | |||
sideBarSectionHeader.border | |||
sideBarTitle.foreground | |||
statusBarItem.errorBackground | |||
statusBarItem.remoteBackground | |||
statusBarItem.remoteForeground | |||
tab.lastPinnedBorder | |||
terminal.inactiveSelectionBackground |
Foregrounds this theme assigns to the token scope catalog. A rule with only a font style is skipped, and a longer matching scope wins. Italic and bold rules are not listed — the preview above shows them in the code.
| scope | HEX | RGB | RGBA |
|---|---|---|---|
comment | |||
comment.block | |||
comment.block.documentation | |||
comment.line | |||
constant | |||
constant.numeric | |||
constant.numeric.integer | |||
constant.numeric.float | |||
constant.numeric.hex | |||
constant.numeric.octal | |||
constant.other | |||
constant.regexp | |||
entity | |||
entity.name | |||
entity.name.class | |||
entity.name.function | |||
entity.name.method | |||
entity.name.namespace | |||
entity.name.section | |||
entity.name.selector | |||
entity.name.tag | |||
entity.name.type | |||
entity.name.type.enum | |||
entity.name.type.interface | |||
entity.name.type.struct | |||
entity.other | |||
entity.other.attribute-name | |||
invalid | |||
invalid.deprecated | |||
invalid.illegal | |||
keyword | |||
keyword.control | |||
keyword.control.flow | |||
keyword.operator | |||
keyword.operator.new | |||
keyword.operator.assignment | |||
keyword.operator.arithmetic | |||
keyword.operator.logical | |||
keyword.other | |||
markup | |||
markup.bold | |||
markup.changed | |||
markup.deleted | |||
markup.heading | |||
markup.inline.raw | |||
markup.inserted | |||
meta | |||
meta.preprocessor | |||
storage | |||
storage.modifier | |||
storage.type | |||
string | |||
string.interpolated | |||
string.other | |||
string.quoted | |||
string.quoted.double | |||
string.quoted.other | |||
string.quoted.single | |||
string.quoted.triple | |||
string.regexp | |||
string.template | |||
string.unquoted | |||
support | |||
support.constant | |||
support.function | |||
support.type | |||
support.type.property-name | |||
variable | |||
variable.function | |||
variable.language | |||
variable.name | |||
variable.other | |||
variable.other.constant | |||
variable.other.property | |||
variable.other.readwrite | |||
variable.parameter |