Fluid 1.3.0
Material Design for QtQuick and Qml
Loading...
Searching...
No Matches
colorlight.cpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
2// SPDX-License-Identifier: MPL-2.0
3
4#include "colorlight.h"
5#include "palette.h"
6
7namespace Fluid {
8
9// Mappings from ColorLightTokens.kt, VERSION: v0_210, in the pinned AndroidX directory:
10// https://android.googlesource.com/platform/frameworks/support/+/5ba2cdd61be7b6945db999b238d14f3c626136fb/compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/tokens/
11#define FLUID_COLOR_TOKEN(name, paletteName) \
12 QColor ColorLightTokens::name() const \
13 { \
14 return PaletteTokens().paletteName(); \
15 }
16
17FLUID_COLOR_TOKEN(background, neutral98)
18FLUID_COLOR_TOKEN(error, error40)
19FLUID_COLOR_TOKEN(errorContainer, error90)
20FLUID_COLOR_TOKEN(inverseOnSurface, neutral95)
21FLUID_COLOR_TOKEN(inversePrimary, primary80)
22FLUID_COLOR_TOKEN(inverseSurface, neutral20)
23FLUID_COLOR_TOKEN(onBackground, neutral10)
24FLUID_COLOR_TOKEN(onError, error100)
25FLUID_COLOR_TOKEN(onErrorContainer, error10)
26FLUID_COLOR_TOKEN(onPrimary, primary100)
27FLUID_COLOR_TOKEN(onPrimaryContainer, primary10)
28FLUID_COLOR_TOKEN(onPrimaryFixed, primary10)
29FLUID_COLOR_TOKEN(onPrimaryFixedVariant, primary30)
30FLUID_COLOR_TOKEN(onSecondary, secondary100)
31FLUID_COLOR_TOKEN(onSecondaryContainer, secondary10)
32FLUID_COLOR_TOKEN(onSecondaryFixed, secondary10)
33FLUID_COLOR_TOKEN(onSecondaryFixedVariant, secondary30)
34FLUID_COLOR_TOKEN(onSurface, neutral10)
35FLUID_COLOR_TOKEN(onSurfaceVariant, neutralVariant30)
36FLUID_COLOR_TOKEN(onTertiary, tertiary100)
37FLUID_COLOR_TOKEN(onTertiaryContainer, tertiary10)
38FLUID_COLOR_TOKEN(onTertiaryFixed, tertiary10)
39FLUID_COLOR_TOKEN(onTertiaryFixedVariant, tertiary30)
40FLUID_COLOR_TOKEN(outline, neutralVariant50)
41FLUID_COLOR_TOKEN(outlineVariant, neutralVariant80)
42FLUID_COLOR_TOKEN(primary, primary40)
43FLUID_COLOR_TOKEN(primaryContainer, primary90)
44FLUID_COLOR_TOKEN(primaryFixed, primary90)
45FLUID_COLOR_TOKEN(primaryFixedDim, primary80)
46FLUID_COLOR_TOKEN(scrim, neutral0)
47FLUID_COLOR_TOKEN(secondary, secondary40)
48FLUID_COLOR_TOKEN(secondaryContainer, secondary90)
49FLUID_COLOR_TOKEN(secondaryFixed, secondary90)
50FLUID_COLOR_TOKEN(secondaryFixedDim, secondary80)
51FLUID_COLOR_TOKEN(surface, neutral98)
52FLUID_COLOR_TOKEN(surfaceBright, neutral98)
53FLUID_COLOR_TOKEN(surfaceContainer, neutral94)
54FLUID_COLOR_TOKEN(surfaceContainerHigh, neutral92)
55FLUID_COLOR_TOKEN(surfaceContainerHighest, neutral90)
56FLUID_COLOR_TOKEN(surfaceContainerLow, neutral96)
57FLUID_COLOR_TOKEN(surfaceContainerLowest, neutral100)
58FLUID_COLOR_TOKEN(surfaceDim, neutral87)
59FLUID_COLOR_TOKEN(surfaceTint, primary40)
60FLUID_COLOR_TOKEN(surfaceVariant, neutralVariant90)
61FLUID_COLOR_TOKEN(tertiary, tertiary40)
62FLUID_COLOR_TOKEN(tertiaryContainer, tertiary90)
63FLUID_COLOR_TOKEN(tertiaryFixed, tertiary90)
64FLUID_COLOR_TOKEN(tertiaryFixedDim, tertiary80)
65
66#undef FLUID_COLOR_TOKEN
67
68} // namespace Fluid
#define FLUID_COLOR_TOKEN(name, paletteName)
Definition colordark.cpp:11