Do it manually:
Freeze reference colors: Select cell with formula → Edit (Place cursor in cell) → Ctrl+C (The color will disappear) → Ctrl+Z (The color will reappear) → ’ (Insert an apostrophe before the = sign) → Enter
Done. Copy and paste the formula backup on the Backup sheet.
Calc RGB Color Cycle: Blue(0,0,255); Red(255,0,0); Fuchsia(255,0,255); Green(0,128,0); Navy(0,0,128); Maroon(128,0,0); Purple(128,0,128); Olive(128,128,0), then repeats.
Is there an API method?
I always back up my formulas. But why not make them more descriptive for readability, if there is such an opportunity and there is time for it?
Sometimes, if it’s a mega-formula, Calc colors the references but makes the base color very pale (RGB(238,238,238) in my case) on a gray background (see screenshot), probably a bug. The default color can be easily restored by calling the @Lupp ReplaceExplicitFontColor() procedure (although the 5 nested for-loops procedure itself is not so simple ).
Such help is of little use.