thephpleague / color-extractor

Extract colors from an image like a human would do.
thephpleague.com
MIT License
1.3k stars 159 forks source link

Undefined offset error #54

Closed Asedol closed 2 years ago

Asedol commented 5 years ago

Dude, fix getColorCount in Palette class. Something like this: public function getColorCount($color) { if(array_key_exists($color, $this->colors)) { return $this->colors[$color]; } return 0; }

colinodell commented 2 years ago

Fixed in v0.4.0 via 21fcac6. Thanks for the report!