CefColorIds
Header: cef_color_ids.h
Category: System Utilities
Overview
Tasks, threads, parsers, streams, cookies, URL requests, scheme registration, and constant tables.
MacroGroup — Color ID Tables (E_CPONLY(...) macros)
Source File: include/cef_color_ids.h
Process / Thread Context: Compile-time only (macro definitions); the runtime enum cef_color_id_t is C-exposed.
Purpose: Generated by make_pack_header.py. Defines ~1,669 unique color IDs as E_CPONLY(name[, start_value, ...]) macro invocations grouped into four aggregate macros (CROSS_PLATFORM_COLOR_IDS, PLATFORM_SPECIFIC_COLOR_IDS, COMPONENTS_COLOR_IDS, CHROME_COLOR_IDS). At the bottom of the file, these macros are expanded inside a typedef enum { ... } cef_color_id_t; via include/base/internal/cef_color_id_macros.inc, producing the actual enum values. Clients may extend the enum starting from CEF_ChromeColorsEnd and must not exceed CEF_UiColorsLast = 0xffff.
Notable Members
The cef_color_id_t enum is partitioned into three contiguous numeric ranges:
| Range | Bound markers | Source | Contents |
|---|---|---|---|
| UI colors | CEF_UiColorsStart (0) → CEF_UiColorsEnd | ui/color/color_id.h | Reference color tokens (CEF_ColorRefPrimary*, CEF_ColorRefSecondary*, CEF_ColorRefTertiary*, CEF_ColorRefError*, CEF_ColorRefNeutral*, CEF_ColorRefNeutralVariant*), Material system color tokens (CEF_ColorSysPrimary, CEF_ColorSysOnPrimary, ... CEF_ColorSysSurface*, CEF_ColorSysState*), plus platform-specific (Windows / Mac / Linux / Ash / ChromeOS) tokens such as CEF_ColorNative*. |
| Components colors | CEF_ComponentsColorsStart (= CEF_UiColorsEnd) → CEF_ComponentsColorsEnd | components/color/color_id.h | kFullscreenNotificationOpaqueBackgroundColor, kFullscreenNotificationTransparentBackgroundColor, CEF_ColorEyedropper* (non-Mac). |
| Chrome colors | CEF_ChromeColorsStart (= CEF_ComponentsColorsEnd) → CEF_ChromeColorsEnd | chrome/browser/ui/color/chrome_color_id.h | The largest set: hundreds of `CEF_Color<AppMenu* |
| Bounding marker | Value | Notes |
|---|---|---|
CEF_UiColorsStart | 0 | First color ID. |
CEF_UiColorsEnd | (after COLOR_IDS) | End of UI range; start of components range. |
CEF_ComponentsColorsStart | = CEF_UiColorsEnd | Components range start. |
CEF_ComponentsColorsEnd | (after COMPONENTS_COLOR_IDS) | End of components range. |
CEF_ChromeColorsStart | = CEF_ComponentsColorsEnd | Chrome range start. |
CEF_ChromeColorsEnd | (after CHROME_COLOR_IDS) | Clients must start custom color IDs from this value. |
CEF_UiColorsLast | 0xffff | Hard ceiling; no color ID may exceed this. |
Color-token family overview (top categories by leading prefix):
| Prefix | Approx count | Family |
|---|---|---|
CEF_ColorRef* | 98 | Material reference tonal palette (primary/secondary/tertiary/error/neutral/neutral-variant). |
CEF_ColorSys* | 113 | Material-system semantic tokens (primary/onPrimary/primaryContainer, error, surface, state, etc.). |
CEF_ColorRead* | 161 | Reading-mode surfaces. |
CEF_ColorTab* | 121 | Tab strip / tab search / tab containers. |
CEF_ColorNew* | 114 | New Tab Page surfaces. |
CEF_ColorOmnibox* | 83 | Omnibox (address bar). |
CEF_ColorSide* | 67 | Side panel surfaces. |
CEF_ColorWeb* | 56 | WebUI surfaces. |
CEF_ColorComposebox* | 41 | Compose dialog surfaces. |
CEF_ColorToolbar* | 38 | Toolbar surfaces. |
CEF_ColorNative* | 37 | Platform-native system colors (Win/Mac/Linux/Ash). |
CEF_ColorSearchbox* | 27 | Searchbox surfaces. |
CEF_ColorProduct* | 24 | Product / commerce surfaces. |
CEF_ColorThumbnail* | 22 | Thumbnail tiles. |
CEF_ColorCompose* | 20 | Compose dialog tokens. |
CEF_ColorAvatar* | 20 | Avatar / profile button. |
CEF_ColorMenu* | 19 | Menu surfaces. |
CEF_ColorBookmark* | 19 | Bookmark bar / manager. |
CEF_ColorTextfield* | 18 | Textfield tokens. |
CEF_ColorSaved* | 18 | Saved-tab-groups / saved surfaces. |
CEF_ColorDownload* | 18 | Download bubble / toolbar. |
CEF_ColorAsh* | 18 | ChromeOS Ash surfaces. |
CEF_ColorButton* | 17 | Button tokens. |
CEF_ColorHistory* | 16 | History surfaces. |
CEF_ColorFeature* | 15 | Feature promo / first-run. |
CEF_ColorCss* | 15 | CSS exposed color tokens. |
CEF_ColorApp* | 15 | App menu. |
CEF_ColorGlic* | 14 | Glic / GLIC surfaces. |
CEF_ColorTable* | 13 | Table view tokens. |
CEF_ColorPayments* | 13 | Payments surfaces. |
(There are ~1,669 unique color ID names total. The above list highlights the top 30 families — refer to the header for the complete enumeration.)
Usage Example
#include "include/cef_color_ids.h"
// cef_color_id_t is the underlying enum type. Custom color IDs begin after
// CEF_ChromeColorsEnd.
enum : cef_color_id_t {
kMyAppAccent = CEF_ChromeColorsEnd,
kMyAppAccentFg,
kMyAppSurface,
};
// Resolve a color via the platform color provider (see CefColorProvider /
// ui/color APIs in the views layer). Concrete APIs vary by CEF version.
cef_color_id_t id = CEF_ColorSysPrimary;
// ... pass `id` to whichever color-resolution API your CEF build exposes ...