1 | <?php |
||
7 | class main implements \Serializable { |
||
8 | |||
9 | public $color; |
||
10 | public $hsl_result_accuracy = 0; |
||
11 | |||
12 | public function __construct($color) { |
||
15 | |||
16 | public function __clone() { |
||
21 | |||
22 | public function serialize() :string { |
||
25 | |||
26 | public function unserialize($serialized) { |
||
31 | |||
32 | public function set($color, string $type = '') { |
||
39 | |||
40 | public function rgb() :array { |
||
43 | |||
44 | public function hsl() :array { |
||
51 | |||
52 | public function cmyk() :array { |
||
56 | |||
57 | public function hex() :string { |
||
60 | |||
61 | public function css() :string { |
||
64 | |||
65 | public function is_dark(int $check_score = 128) :bool { |
||
69 | |||
70 | public function red(float $adjustment, bool $as_percentage = FALSE, bool $set_absolute = TRUE) { |
||
73 | |||
74 | public function green(float $adjustment, bool $as_percentage = FALSE, bool $set_absolute = TRUE) { |
||
77 | |||
78 | public function blue(float $adjustment, bool $as_percentage = FALSE, bool $set_absolute = TRUE) { |
||
81 | |||
82 | public function hue(float $adjustment, bool $as_percentage = FALSE, bool $set_absolute = TRUE) { |
||
85 | |||
86 | public function saturation(float $adjustment, bool $as_percentage = FALSE, bool $set_absolute = TRUE) { |
||
89 | |||
90 | public function light(float $adjustment, bool $as_percentage = FALSE, bool $set_absolute = TRUE) { |
||
93 | |||
94 | public function rgb_scheme(string $scheme_name = '') :array { |
||
100 | |||
101 | public function hsl_scheme(string $scheme_name = '') :array { |
||
114 | |||
115 | public function hex_scheme(string $scheme_name = '') :array { |
||
121 | |||
122 | public function cmyk_scheme(string $scheme_name = '') :array { |
||
128 | |||
129 | protected static function _convert_scheme(array $scheme, callable $callback) { |
||
136 | } |
||
137 |