public static function fromRgb($red, $green, $blue, $alpha = 255)
    {
        $color = new Color();
        $color->r = $red;
        $color->g = $green;
        $color->b = $blue;
        $color->a = $alpha;
        return $color;
    }
public static function fromRgb($red, $green, $blue, $alpha = 255)
    {
        $color = new Color();
        $color->r = $red;
        $color->g = $green;
        $color->b = $blue;
        $color->a = $alpha;
        return $color;
    }
public static function fromRgb ( $ red , $ green , $ blue , $ alpha = 255 ) { $ color = new Color ( ) ; $ color -> r = $ red ; $ color -> g = $ green ; $ color -> b = $ blue ; $ color -> a = $ alpha ; return $ color ; }
Creates a Color from an RGB value.

@param int $alpha Alpha channel value in the range [0, 255].
@param int $red Red component in the range [0, 255].
@param int $green GReen component in the range [0, 255].
@param int $blue Blue component in the range [0, 255].
Creates a Color from an RGB value .