1 | <?php |
||
10 | trait Convert |
||
11 | { |
||
12 | /** |
||
13 | * Converts red-green-blue(RGB) to hexadecimal |
||
14 | * |
||
15 | * @param array $rgb RGB color |
||
|
|||
16 | * @return string Hexadecimal color |
||
17 | */ |
||
18 | public static function rgbhex(...$rgb) |
||
31 | |||
32 | /** |
||
33 | * Converts hexadecimal to red-green-blue(RGB) |
||
34 | * |
||
35 | * @used-by Holt45::rainbowText(); |
||
36 | * |
||
37 | * @param string $hex Hexadecimal color |
||
38 | * @return null|int[] RGB color |
||
39 | */ |
||
40 | public static function hexrgb($hex) |
||
62 | |||
63 | /** |
||
64 | * Converts hexadecimal to red-green-blue(RGB) |
||
65 | * |
||
66 | * @used-by Holt45::rainbowText(); |
||
67 | * |
||
68 | * @param array $arrayRGB RGB color |
||
69 | * @param array $arrayRGB2 RGB color |
||
70 | * @return int[] Blended RGB color |
||
71 | */ |
||
72 | public static function colorBlend($arrayRGB, $arrayRGB2) |
||
82 | } |
||
83 |