Sass invert() Function

You are Here:

Sass invert() Function

The invert() function returns the inverse or negative of a given color.

Example

SASS TO CSS CONVERTER
.foo{ color: invert(white); color: invert(#b37399); color: invert(#550e0c, 20%); }

Syntax

invert($color, $weight)

Parameter Value

ValueTypeExplanation
$colorRequiredSpecifies a color.
$weightOptionalThe $weight must be a number between 0% and 100% (both are inclusive).
  • A higher weight means the result will be closer to the negative.
  • A lower weight means it will be closer to $color.
  • 50% will always produce #808080.

Return Value

ValueExplanation
colorReturns the negative or inverse of $color

Reminder

Hi Developers, we almost covered 99.1% of Sass Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in Sass.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Share this Page

Meet the Author