The colors for .light and .dark gets changed to thier opposite if darkmode is enabled.
You can simply redefine the theme color variables. The secondary color is used as hover color by the most components. You can create your own class like .magenta for some elements or overrite the :root pseudoclass to set the color for the whole theme.
The css applies the systems color scheme by default. If you want to force a scheme for an element, you can add the lightmode or darkmode class to your element. You can put this class in your <body> tag if you want to force the scheme to the whole webseite.
<div class="lightmode">...</div>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
<div class="darkmode">...</div>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
Elements with grey background in front of element with grey background can adjust their grey value based on the primary and secondary grey value.
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
You can implement this behavior for your own elements by overwriting the grey variable for child elements while using the primary grey variable as background.
You can define your own main color for the theme by overriding the theme variables in the :root class. The theme color applies to menu, buttons, inputs and other elemnts.
Variables | Default |
---|---|
--theme-primary-color | #0033ff |
--theme-secondary-color | #0024b3 |
--theme-info-color | #0033ff |
--theme-success-color | #1f9900 |
--theme-warning-color | #e5b800 |
--theme-error-color | #e60000 |
Color Scheme Dependent Variables | Lightmode | Darkmode |
---|---|---|
--theme-background-color | #ffffff | #000000 |
--theme-light-color | #ffffff | #000000 |
--theme-dark-color | #000000 | #ffffff |
--theme-primary-grey-color | #e0e0e0 | #1f1f1f |
--theme-secondary-grey-color | #c2c2c2 | #3d3d3d |
Color Scheme Dependent Text Variables | Lightmode | Darkmode |
---|---|---|
--theme-text-color | #000000 | #ffffff |
--theme-text-grey-color | #666666 | #999999 |