Lumo Colors
Lumo defines a set of style properties (i.e., CSS custom properties) for colors. You can use these properties to apply a consistent color palette across your application.
You can use the built-in Lumo light and dark mode variants to switch the color palette of all components in your application. This page lists and displays the available color properties in Lumo.
Lumo uses the light theme variant, by default. You can change colors for the light theme by customizing the style properties, like this:
html {
--lumo-primary-color: blue;
}
If you’re using the Lumo Dark theme variant, customize colors after the [theme~="dark"]
selector like this:
[theme~="dark"] {
--lumo-primary-color: red;
}
By using the ~=
operator in the [theme~="dark"]
selector it’ll match the color when multiple theme variants are defined on a single element. For example, if you use the theme="small dark"
attribute on a HTML element somewhere in the global style scope of your application, the color change applies to it, as well. This helps you achieve a unified appearance between the different components in your application. Using only the =
operator here is slightly more performant, but it won’t match the color on other instances.
Grayscale
These colors form the foundation for your application colors. The grayscale colors are useful for dividing pages into sections with different backgrounds and borders, or they might be used as text colors.
Description | CSS Custom Property |
---|---|
Contrast 5% | --lumo-contrast-5pct: |
Contrast 10% | --lumo-contrast-10pct: |
Contrast 20% | --lumo-contrast-20pct: |
Contrast 30% | --lumo-contrast-30pct: |
Contrast 40% | --lumo-contrast-40pct: |
Contrast 50% | --lumo-contrast-50pct: |
Contrast 60% | --lumo-contrast-60pct: |
Contrast 70% | --lumo-contrast-70pct: |
Contrast 80% | --lumo-contrast-80pct: |
Contrast 90% | --lumo-contrast-90pct: |
Contrast 100% | --lumo-contrast: |
Primary
This is the most prominent color in the system. It’s used to bring attention to certain elements in the interface. Accompanying text and contrast colors are also defined.
Description | CSS Custom Property |
---|---|
Primary 10% | --lumo-primary-color-10pct: |
Primary 50% | --lumo-primary-color-50pct: |
Primary 100% | --lumo-primary-color: |
Primary Text | --lumo-primary-text-color: |
Primary Contrast | --lumo-primary-contrast-color: |
Error
The color red is most often used for errors. It’s used for error indicators, error messages, and buttons that can cause permanent data loss. Accompanying text and contrast colors are also defined.
Description | CSS Custom Property |
---|---|
Error 10% | --lumo-error-color-10pct: |
Error 50% | --lumo-error-color-50pct: |
Error 100% | --lumo-error-color: |
Error Text | --lumo-error-text-color: |
Error Contrast | --lumo-error-contrast-color: |
Warning
Warning colors are used primarily for warning notifications. They’re displayed typically in yellow or orange,
Description | CSS Custom Property |
---|---|
Warning 10% | --lumo-warning-color-10pct: |
Warning 100% | --lumo-warning-color: |
Warning Text | --lumo-warning-text-color: |
Warning Contrast | --lumo-warning-contrast-color: |
Success
This is most often depicted with a green color. It’s used for success messages, and buttons that complete a certain task. Accompanying text and contrast colors are also defined.
Description | CSS Custom Property |
---|---|
Success 10% | --lumo-success-color-10pct: |
Success 50% | --lumo-success-color-50pct: |
Success 100% | --lumo-success-color: |
Success Text | --lumo-success-text-color: |
Success Contrast | --lumo-success-contrast-color: |
Text
The following text colors have appropriate contrast with the Base color.
Description | CSS Custom Property |
---|---|
Heading Text | --lumo-header-text-color: |
Body Text | --lumo-body-text-color: |
Secondary Text | --lumo-secondary-text-color: |
Tertiary Text | --lumo-tertiary-text-color: |
Disabled Text | --lumo-disabled-text-color: |
3DBA5F46-2A23-4826-B650-92FE05C1EF82