Skip to content

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:

RangeBound markersSourceContents
UI colorsCEF_UiColorsStart (0) → CEF_UiColorsEndui/color/color_id.hReference 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 colorsCEF_ComponentsColorsStart (= CEF_UiColorsEnd) → CEF_ComponentsColorsEndcomponents/color/color_id.hkFullscreenNotificationOpaqueBackgroundColor, kFullscreenNotificationTransparentBackgroundColor, CEF_ColorEyedropper* (non-Mac).
Chrome colorsCEF_ChromeColorsStart (= CEF_ComponentsColorsEnd) → CEF_ChromeColorsEndchrome/browser/ui/color/chrome_color_id.hThe largest set: hundreds of `CEF_Color<AppMenu*
Bounding markerValueNotes
CEF_UiColorsStart0First color ID.
CEF_UiColorsEnd(after COLOR_IDS)End of UI range; start of components range.
CEF_ComponentsColorsStart= CEF_UiColorsEndComponents range start.
CEF_ComponentsColorsEnd(after COMPONENTS_COLOR_IDS)End of components range.
CEF_ChromeColorsStart= CEF_ComponentsColorsEndChrome range start.
CEF_ChromeColorsEnd(after CHROME_COLOR_IDS)Clients must start custom color IDs from this value.
CEF_UiColorsLast0xffffHard ceiling; no color ID may exceed this.

Color-token family overview (top categories by leading prefix):

PrefixApprox countFamily
CEF_ColorRef*98Material reference tonal palette (primary/secondary/tertiary/error/neutral/neutral-variant).
CEF_ColorSys*113Material-system semantic tokens (primary/onPrimary/primaryContainer, error, surface, state, etc.).
CEF_ColorRead*161Reading-mode surfaces.
CEF_ColorTab*121Tab strip / tab search / tab containers.
CEF_ColorNew*114New Tab Page surfaces.
CEF_ColorOmnibox*83Omnibox (address bar).
CEF_ColorSide*67Side panel surfaces.
CEF_ColorWeb*56WebUI surfaces.
CEF_ColorComposebox*41Compose dialog surfaces.
CEF_ColorToolbar*38Toolbar surfaces.
CEF_ColorNative*37Platform-native system colors (Win/Mac/Linux/Ash).
CEF_ColorSearchbox*27Searchbox surfaces.
CEF_ColorProduct*24Product / commerce surfaces.
CEF_ColorThumbnail*22Thumbnail tiles.
CEF_ColorCompose*20Compose dialog tokens.
CEF_ColorAvatar*20Avatar / profile button.
CEF_ColorMenu*19Menu surfaces.
CEF_ColorBookmark*19Bookmark bar / manager.
CEF_ColorTextfield*18Textfield tokens.
CEF_ColorSaved*18Saved-tab-groups / saved surfaces.
CEF_ColorDownload*18Download bubble / toolbar.
CEF_ColorAsh*18ChromeOS Ash surfaces.
CEF_ColorButton*17Button tokens.
CEF_ColorHistory*16History surfaces.
CEF_ColorFeature*15Feature promo / first-run.
CEF_ColorCss*15CSS exposed color tokens.
CEF_ColorApp*15App menu.
CEF_ColorGlic*14Glic / GLIC surfaces.
CEF_ColorTable*13Table view tokens.
CEF_ColorPayments*13Payments 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

cpp
#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 ...

Derived from the CEF C++ headers — © Marshall A. Greenblatt, Google Inc. & contributors (BSD-style license). Not an official CEF project.