33constexpr float XS = 4.0f;
34constexpr float S = 8.0f;
35constexpr float M = 12.0f;
36constexpr float L = 16.0f;
37constexpr float XL = 24.0f;
117float contrastRatio(
const ImVec4& first,
const ImVec4& second);
133void setClub(std::optional<TeamID> teamId);
166ImU32
toU32(
const ImVec4& color,
float alpha = 1.0f);
169uint32_t
packRgb(
const ImVec4& color);
Pushes a typography level for the lifetime of the object.
Definition theme.h:176
~ScopedText()
Definition theme.cpp:551
ScopedText & operator=(const ScopedText &)=delete
ScopedText(const ScopedText &)=delete
constexpr float XS
Definition theme.h:33
constexpr float M
Definition theme.h:35
constexpr float S
Definition theme.h:34
constexpr float XL
Definition theme.h:37
constexpr float L
Definition theme.h:36
Design tokens shared by every management screen.
Definition theme.cpp:322
ImU32 toU32(const ImVec4 &color, float alpha)
Converts a colour with an optional alpha multiplier.
Definition theme.cpp:524
float scale()
Effective UI scale (fonts and sizes).
Definition theme.cpp:435
ImVec4 ratingColor(double value)
Continuous colour scale for 0-100 ratings (red to green).
Definition theme.cpp:474
ImVec4 unpackRgb(uint32_t rgb)
Unpacks 0xRRGGBB into an opaque colour.
Definition theme.cpp:539
const char * presetKey(Preset preset)
Localisation key of a preset name.
Definition theme.cpp:446
const Palette & palette()
Returns the active palette (accent included).
Definition theme.cpp:374
float textSize(Text level)
Unscaled pixel size for a typography level.
Definition theme.cpp:503
bool reducedMotion()
True when animations should be avoided.
Definition theme.cpp:437
void setClub(std::optional< TeamID > teamId)
Tells the theme which club is managed (for club accents).
Definition theme.cpp:428
Preset
Built-in palettes.
Definition theme.h:53
const char * colorVisionKey(ColorVision vision)
Localisation key of a colour-vision mode's name.
Definition theme.cpp:351
const Appearance & appearance()
Returns the active appearance options.
Definition theme.cpp:376
Text
Typography scale.
Definition theme.h:42
Palette presetPalette(Preset preset, ColorVision vision, const ImVec4 &accent)
Palette of a preset without applying it (no ImGui state touched), e.g. for previews and contrast chec...
Definition theme.cpp:324
void apply(const Appearance &options, float displayScale)
Applies an appearance to the current ImGui style.
Definition theme.cpp:378
Swatch presetSwatch(Preset preset)
Preview colours of a preset without applying it.
Definition theme.cpp:439
ColorVision
Hues of the status colours. Good and bad are never told apart by red against green alone in the safe ...
Definition theme.h:68
uint32_t packRgb(const ImVec4 &color)
Packs an opaque colour as 0xRRGGBB (for settings files).
Definition theme.cpp:529
float contrastRatio(const ImVec4 &first, const ImVec4 &second)
WCAG contrast ratio of two opaque colours (1 to 21).
Definition theme.cpp:367
ImVec4 clubAccent(TeamID teamId)
Deterministic accent colour for a club.
Definition theme.cpp:469
User-selected appearance options.
Definition theme.h:77
ImVec4 custom_accent
Definition theme.h:80
ColorVision color_vision
Definition theme.h:84
bool compact
Definition theme.h:82
float ui_scale
Definition theme.h:81
bool club_accent
Definition theme.h:79
float text_scale
Definition theme.h:85
Preset preset
Definition theme.h:78
bool reduced_motion
Definition theme.h:83
Semantic colours used by widgets.
Definition theme.h:90
ImVec4 raised
Definition theme.h:94
ImVec4 sidebar
Definition theme.h:92
ImVec4 surface
Definition theme.h:93
ImVec4 muted
Definition theme.h:97
ImVec4 text
Definition theme.h:96
ImVec4 info
Definition theme.h:102
ImVec4 background
Definition theme.h:91
ImVec4 negative
Definition theme.h:101
ImVec4 warning
Definition theme.h:100
ImVec4 on_accent
Definition theme.h:104
ImVec4 positive
Definition theme.h:99
ImVec4 faint
Definition theme.h:98
ImVec4 accent
Definition theme.h:103
ImVec4 border
Definition theme.h:95
Representative colours of a preset, for previews.
Definition theme.h:143
ImVec4 muted
Definition theme.h:147
ImVec4 surface
Definition theme.h:145
ImVec4 background
Definition theme.h:144
ImVec4 text
Definition theme.h:146
uint16_t TeamID
Type alias for Team identifiers.
Definition types.h:18