Previously, when getting the palette from an image file with less than the expected number of colours, CoilSnake would raise an IndexError due to indexing outside the bounds of the palette array. Now, we will substitute in (0,0,0) instead.
Additionally, the palette class was refactored to avoid code duplication.
Previously, when getting the palette from an image file with less than the expected number of colours, CoilSnake would raise an IndexError due to indexing outside the bounds of the palette array. Now, we will substitute in (0,0,0) instead.
Additionally, the palette class was refactored to avoid code duplication.