ColorScheme: fix stack-use-after-scope detected by ASAN
(cherry picked from commit 2251d55857c950cebaa5fe331b01b5ab220b03b4)