Colors
This section describes the CSS variables that define the color palette used in the components. It also explains how light and dark modes are implemented to enhance user experience.
Color Variables
Base Variables
These variables are used to define primary, secondary, dark, and neutral colors. They are applied consistently across the project to maintain a coherent visual identity.
Variables
Color Modes
To enhance user experience, we use light and dark color modes that adjust automatically based on user preferences or system settings. This is achieved using specific classes and data attributes to determine the current theme.
Light Mode
-
Description: In light mode, we use lighter colors for backgrounds and primary elements, while text and prominent elements are darker.
-
Color Variables: Variables
--ac-color-100
to--ac-color-700
are mapped to lighter colors, ending with--ac-dark
for text and important elements.
Dark Mode
-
Description: In dark mode, we use darker colors for backgrounds and lighter colors for text and highlighted elements, reducing visual fatigue in low-light environments.
-
Color Variables: Variables
--ac-color-100
to--ac-color-700
are inverted compared to light mode, starting with--ac-dark
and ending with--ac-white
for text and important elements.