def invert(color, weight = number(100))
      if color.is_a?(Sass::Script::Value::Number)
        return identifier("invert(#{color})")
      end

      assert_type color, :Color, :color
      inv = color.with(
        :red => (255 - color.red),
        :green => (255 - color.green),
        :blue => (255 - color.blue))

      mix(inv, color, weight)
    end
def invert(color, weight = number(100))
      if color.is_a?(Sass::Script::Value::Number)
        return identifier("invert(#{color})")
      end

      assert_type color, :Color, :color
      inv = color.with(
        :red => (255 - color.red),
        :green => (255 - color.green),
        :blue => (255 - color.blue))

      mix(inv, color, weight)
    end
Returns the inverse (negative) of a color. The red, green, and blue values
 are inverted, while the opacity is left alone.

 @overload invert($color)
   @param $color [Sass::Script::Value::Color]
 @overload invert($color, $weight: 100%)
   @param $color [Sass::Script::Value::Color]
   @param $weight [Sass::Script::Value::Number] The relative weight of the
     color color's inverse
 @return [Sass::Script::Value::Color]
 @raise [ArgumentError] if `$color` isn't a color or `$weight`
   isn't a percentage between 0% and 100%