Skip to content

ui::ClassicPalette

Header: winui/ui/themes/ClassicPalette.hpp.

The classic era's color scheme: the colors a classic 3-D look is drawn with. Palette is the Fluent counterpart.

Theme::classic() derives a whole Theme, every control's visuals included, from one of these. A Windows 95, 98 or 2000 look, Windows Classic on XP, or a custom scheme is one literal plus that derivation, with no hand-assembled ButtonVisuals. face_text, window_text and menu_text are separate fields, so a scheme with a dark face, such as classic "Eggplant", can use light text.

Example:

// A shipped scheme:
window.pin_theme(ui::Theme::classic(ui::ClassicPalette::windows_standard(),
                                        /*hot_track=*/false, "Microsoft Sans Serif"));

// A user-authored one, derived from its face and then touched up:
ui::ClassicPalette scheme = ui::ClassicPalette::from_face(ui::Color::from_rgba(128, 128, 64));
scheme.selection = ui::Color::from_rgba(128, 0, 128);
window.pin_theme(ui::Theme::classic(scheme, /*hot_track=*/true, "Microsoft Sans Serif"));

face

Color face

Control and dialog surfaces, and the color the bevel ramp is derived from.

face_text

Color face_text

Text on face.

window

Color window

The surface of edit fields and list boxes.

window_text

Color window_text

Text on window.

window_frame

Color window_frame

1px hard frames.

selection

Color selection

Selected items and selected text.

selection_text

Color selection_text

Text on selection.

gray_text

Color gray_text

Disabled text.

Color menu

The menu and menu bar background.

Color menu_text

Menu item text.

info_bk

Color info_bk

The tooltip background, the pale yellow #FFFFE1 in the standard schemes.

info_text

Color info_text

Tooltip text.

hot_light

Color hot_light

Hyperlinks.

bevel

std::optional<ClassicBevelRamp> bevel {}

The bevel ramp, when the scheme states its own. nullopt, the default, derives it from face with classic_bevel_ramp_from_face(). High-contrast schemes need this: High Contrast Black pairs a black face with a white outer dark ring and gray inner rings, which no lightening or darkening of black produces.

caption

std::optional<ClassicCaption> caption {}

The caption and border colors, when the scheme states them. nullopt, the default, derives them as Windows 95 and 98's Windows Standard has them. The active caption is selection and an inactive one is the bevel ramp's shadow, both without a gradient. The active title is selection_text, an inactive title is face, and both borders are face.

windows_standard

static ClassicPalette windows_standard()

The default "Windows Standard" scheme as Windows 95 and Windows 98 SE ship it: a 0xC0C0C0 face and a navy 0x000080 selection. The two versions use the same colors.

windows_standard_2000

static ClassicPalette windows_standard_2000()

"Windows Standard" as Windows 2000 and XP's Classic scheme ship it: the warmer 0xD4D0C8 face, a 0x0A246A selection, a 0x000080 hyperlink, the flatter bevel ramp and a gradient caption. Combining parts of it with windows_standard() gives a look no Windows version had.

high_contrast_black_98

static ClassicPalette high_contrast_black_98()

High Contrast Black as Windows 98 SE ships it. White on black, a purple #800080 selection, green #00FF00 disabled text, a pinkish #D0B0B8 outer light bevel ring and pure-blue #0000FF hyperlinks. The last two look odd but are the shipped values.

high_contrast_black_2000

static ClassicPalette high_contrast_black_2000()

High Contrast Black as Windows 2000 and XP ship it, the scheme both switch to when high contrast is turned on. It is the Windows 98 scheme with a white outer light bevel ring, purple hyperlinks and white-on-black tooltips.

monochrome_3x

static ClassicPalette monochrome_3x()

Monochrome, the Windows 3.1 scheme closest to high contrast: black on white, silver buttons, a black selection and title bar. Windows 3.1 has no tooltip or hyperlink color, so tooltips and hyperlinks use the window colors. Pass it to Theme::classic(..., /*win3x_edge=*/true) for the Windows 3.x edges.

from_face

static ClassicPalette from_face(const Color& face)

A custom scheme derived from face. The bevel comes from classic_bevel_ramp_from_face(), and the rest takes the colors every classic scheme shares: a white window, a navy selection, black text and the pale yellow tooltip. "Windows 95 with the Eggplant scheme" is ClassicPalette::from_face(eggplant_face).