1 | <?php |
||
7 | class main implements \Serializable { |
||
8 | |||
9 | public $color; |
||
10 | |||
11 | public function __construct($color) { |
||
14 | |||
15 | public function __clone() { |
||
20 | |||
21 | public function serialize() :string { |
||
24 | |||
25 | public function unserialize($serialized) { |
||
30 | |||
31 | public function set($color, string $type = '') { |
||
38 | |||
39 | public function rgb() :array { |
||
42 | |||
43 | public function hsl() :array { |
||
46 | |||
47 | public function css() :string { |
||
50 | |||
51 | public function is_dark(int $check_score = 128) :bool { |
||
55 | |||
56 | public function red(float $adjustment, bool $as_percentage = FALSE, bool $set_absolute = TRUE) { |
||
59 | |||
60 | public function green(float $adjustment, bool $as_percentage = FALSE, bool $set_absolute = TRUE) { |
||
63 | |||
64 | public function blue(float $adjustment, bool $as_percentage = FALSE, bool $set_absolute = TRUE) { |
||
67 | |||
68 | public function hue(float $adjustment, bool $as_percentage = FALSE, bool $set_absolute = TRUE) { |
||
71 | |||
72 | public function saturation(float $adjustment, bool $as_percentage = FALSE, bool $set_absolute = TRUE) { |
||
75 | |||
76 | public function light(float $adjustment, bool $as_percentage = FALSE, bool $set_absolute = TRUE) { |
||
79 | |||
80 | public function rgb_scheme(string $scheme_name = '') :array { |
||
86 | |||
87 | public function hsl_scheme(string $scheme_name = '') :array { |
||
100 | |||
101 | public function hex_scheme(string $scheme_name = '') :array { |
||
107 | |||
108 | public function cmyk_scheme(string $scheme_name = '') :array { |
||
114 | |||
115 | protected static function _convert_scheme(array $scheme, callable $callback) { |
||
122 | } |
||
123 |