Correct blue = rgb[2], was incorrectly set to rgb[3]