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¶
Control and dialog surfaces, and the color the bevel ramp is derived from.
face_text¶
window¶
The surface of edit fields and list boxes.
window_text¶
window_frame¶
1px hard frames.
selection¶
Selected items and selected text.
selection_text¶
gray_text¶
Disabled text.
menu¶
The menu and menu bar background.
menu_text¶
Menu item text.
info_bk¶
The tooltip background, the pale yellow #FFFFE1 in the standard schemes.
info_text¶
Tooltip text.
hot_light¶
Hyperlinks.
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¶
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¶
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¶
"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¶
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¶
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¶
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¶
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).