Various ways to manage colors in Sass

TiShow
3 min readSep 29, 2023

One of the most useful features of Sass is variables. When variables are used in conjunction with map and @each, they allow for flexible color management and automation.

https://pixabay.com/photos/colorful-painting-background-2468874/

Variables

In the first place, a simple pattern using variables.

$color-medium: #55acee;

.p-button--medium {
background-color: $color-medium;
}

--

--

TiShow

80% is the creation, the rest is depression. Developer and Data scientist. Looking for Physics Ph.D Twitter: @_t_i_show