Functions

We've created a set of predefined helper functions that can help you for creating differnt sort of thing in a better and simple way.


rgba

The rgba() function helps you to create a rgba color code.

pxToRem

The pxToRem() function helps you to convert a px unit into a rem unit,

It will divide each number by the base number which is 16 by default.

hexToRgb

The hexToRgb() function helps you to change the hex color code to rgb using chroma-js library.

boxShadow

The boxShadow() function helps you to simply create a box shadow for an element.

The offset and radius should be an array, the color should be a hex color code, the opacity should be a number between 0 and 1 and the inset should be a string with the value of "inset"

linearGradient

The linearGradient() function helps you to simply create a linear gradient background color.

It can take up to two colors for creating a linear gradient background color. The angle has a default value of 310.

tripleLinearGradient

The tripleLinearGradient() function helps you to simply create a linear gradient background color using 3 colors.

It can take up to three colors for creating a linear gradient background color. The angle has a default value of 310.

radialLinearGradient

The radialLinearGradient() function helps you to simply create a radial gradient background color.

It can take up to two colors for creating a radial gradient background color. The angle has a default value of 310.