Change a few ints to NSIntegers.
Use a double number for RGB_N if CGFloats are doubles.