1 | <?php namespace Arcanedev\Color\Helpers\Converters; |
||
9 | trait HEXTrait |
||
10 | { |
||
11 | /* ------------------------------------------------------------------------------------------------ |
||
12 | | Main Functions |
||
13 | | ------------------------------------------------------------------------------------------------ |
||
14 | */ |
||
15 | /** |
||
16 | * Convert a HEX color to an RGB array. |
||
17 | * |
||
18 | * @param string $hex |
||
19 | * |
||
20 | * @return array |
||
21 | */ |
||
22 | 24 | public static function hexToRgb($hex) |
|
36 | |||
37 | /** |
||
38 | * Convert RGB values to a HEX color. |
||
39 | * |
||
40 | * @param int $red |
||
41 | * @param int $green |
||
42 | * @param int $blue |
||
43 | * |
||
44 | * @return string |
||
45 | */ |
||
46 | public static function rgbToHex($red, $green, $blue) |
||
52 | } |
||
53 |