Sass color function review

When i write a Sass framework,i'm aware of that there's not so much color functions flexible as in Less.The less has some spectacular function like spin,you can use it to create a harmony color theme with just a main color you want to express you thoughts.anyway,let's review some color function in Sass

Firstly,let's set a main color to manipulate


it's somelike a black,

Lighten and Darken

The syntax is following:

darken( $main-color, 10% )  
lighten( $main-color, 10% )  


Saturate and Desaturate

The syntax is following,since the black cannot apparently distinguish the saturation,so we change the color to red,




This sound like you can adjust the (H) from HSL,the syntax is following



Adjust the alpha

You can change a color's opacity without use rgba value,just use the function to change a value from 0 to 1 for the alpha.

rgba($main-color, .5);  

Tint & Shade

They mix your color with a value of white (tint) and black (shade) and are similar to Darken and Lighten.