Fixed a bug in the getColor method