If $colors has zero elements, the "$labCache = new \SplFixedArray($limit - 1);" line will error while trying to create an array with -1 elements.
Fixed in v0.4.0. Thanks for the PR!