Jyxo\Color::toInverse PHP Method

toInverse() public method

Returns an inverse color.
public toInverse ( ) : self
return self
    public function toInverse() : self
    {
        $negative = new self();
        // Subtracts color component values from the maximum luminance
        $negative->setRed(self::LUM_MAX - $this->red)->setGreen(self::LUM_MAX - $this->green)->setBlue(self::LUM_MAX - $this->blue);
        return $negative;
    }