| 1 | <?php |
||
| 5 | class hex implements \projectcleverweb\color\interfaces\converter { |
||
| 6 | use \projectcleverweb\color\traits\converter; |
||
| 7 | |||
| 8 | protected static $default_value = '000000'; |
||
| 9 | |||
| 10 | public static function to_rgb($input) :array { |
||
| 11 | $hex = static::_validate_hex_input($input); |
||
| 12 | return [ |
||
| 13 | 'r' => hexdec(substr($hex, 0, 2)), |
||
| 14 | 'g' => hexdec(substr($hex, 2, 2)), |
||
| 15 | 'b' => hexdec(substr($hex, 4, 2)) |
||
| 16 | ]; |
||
| 17 | } |
||
| 18 | |||
| 19 | public static function to_hex($input) :string { |
||
| 22 | |||
| 23 | public static function to_cmyk($input) :array { |
||
| 26 | |||
| 27 | public static function to_hsl($input) :array { |
||
| 30 | |||
| 31 | public static function to_hsb($input) :array { |
||
| 34 | } |
||
| 35 |