src/Marando/Color/Color.php
public static function hex($hex)
    {
        // RGB Hex -> RGB
        static::hex2rgb($hex, $r, $g, $b);

        return static::rgb($r, $g, $b);
    }
public static function hex($hex)
    {
        // RGB Hex -> RGB
        static::hex2rgb($hex, $r, $g, $b);

        return static::rgb($r, $g, $b);
    }
public static function hex ( $ hex ) { // RGB Hex -> RGB static :: hex2rgb ( $ hex , $ r , $ g , $ b ) ; return static :: rgb ( $ r , $ g , $ b ) ; }
Creates a new Color instance from an RGB hex color code. Both six digit
and 3 digit hex codes are supported.

@param $hex Hex color in format #7d52eb or #7d5.

@return Color
Creates a new Color instance from an RGB hex color code . Both six digit and 3 digit hex codes are supported .