Fix bug in getColorAt function into main file