Lossy compression of color images based on color spaces