Using SCSS functions in the configuration
In this tutorial, you will learn how to use SCSS functions in the theme configuration.
Last updated
In this tutorial, you will learn how to use SCSS functions in the theme configuration.
Last updated
© 2024 by ThemeWare® | Made with 💙 by TC-Innovations GmbH
In the theme configuration you may also use simple SCSS functions in color fields in addition to theme variables. With such functions you can darken or lighten colors, for instance.
A error-free syntax is important to avoid errors in the storefront, therefore these functions are recommended for experienced users.
Tip: In case you simply want to darken or lighten colors and do not want to use SCSS functions, you can use the online tool Sass Color Generator to generate light and dark color shades.
In the following we will introduce a few useful SCSS functions. Please find more information in the official SASS Documentation.
To darken colors you may use the "darken" function:
To lighten colors, use the "lighten" function:
In addition, there are other SCSS functions which can be used:
Several SCSS functions can also be combined in one color field. In the following example, the secondary color is lightened by 15% and the saturation is reduced by 5%: