Fixed some indexing errors; color space conversion

* The test is not given the right result.