Colour is hugely important for adding life and visual interest to a project and is an invaluable tool for highlighting parts of the interface that a user can interact with. In this practical episode we're going to talk all about manipulating colours programmatically with Sass.

Colour functions take the form function-name( $color, $amount ).

The are really useful for manipulating a base pallette of colours for visual details like borders, gradients and drop shadows.

Some of the most popular Sass colour functions include:

  • lighten( )
  • darken( )
  • saturate( )
  • desaturate( )
  • rgba( )

The Sass rgba() function takes any valid colour format and a decimal amount for quick and easy transparent colours without typing out the full red, green and blue values.