Refactor code to use Spectrum rather than RGBColor directly