HexToRGB

Navigation:  Development > Function Reference > Helpers > Utility >

HexToRGB

Previous pageReturn to chapter overviewNext page

Convert a Hexadecimal color code to RGB.

 

App::Utility()->HexToRGB(Hexa Color Code);

 

 

Parameter

Description

Hexa Color Code

Hexa Decimal color code. '#' is not mandatory.

 

 

See bellow example:
 

$rgb = App::Utility()->HexToRGB('#AABBCC');
pr($rgb);
 
$rgb = App::Utility()->HexToRGB('AABBCC');
pr($rgb);
 
/*
Return 
Array
(
    [r] => 170
    [g] => 187
    [b] => 204
)
*/