public function setColor($red = null, $green = null, $blue = null)
    {
        $deferred = new Deferred();

        if (is_null($red)) {
            $this->setAttribute('color', 0);

            $deferred->resolve();

            return $deferred->promise();
        }

        $this->setAttribute('color', $red * 16 ** 4 + $green * 16 ** 2 + $blue);

        $deferred->resolve();

        return $deferred->promise();
    }
public function setColor($red = null, $green = null, $blue = null)
    {
        $deferred = new Deferred();

        if (is_null($red)) {
            $this->setAttribute('color', 0);

            $deferred->resolve();

            return $deferred->promise();
        }

        $this->setAttribute('color', $red * 16 ** 4 + $green * 16 ** 2 + $blue);

        $deferred->resolve();

        return $deferred->promise();
    }
public function setColor ( $ red = null , $ green = null , $ blue = null ) { $ deferred = new Deferred ( ) ; if ( is_null ( $ red ) ) { $ this -> setAttribute ( 'color' , 0 ) ; $ deferred -> resolve ( ) ; return $ deferred -> promise ( ) ; } $ this -> setAttribute ( 'color' , $ red * 16 ** 4 + $ green * 16 ** 2 + $ blue ) ; $ deferred -> resolve ( ) ; return $ deferred -> promise ( ) ; }
Sets the color for a role. RGB.

@param int $red   The red value in RGB.
@param int $green The green value in RGB.
@param int $blue  The blue value in RGB.

@return \React\Promise\Promise
Sets the color for a role . RGB .