This allows us to remove fetch_colors() entirely, and should speed up page load a bit. We also JSONEncoderForHTML instead of dumps so that the result is safe to embed. (imported from commit 013630911960e2ac1d0bae6f5df31ad342750594)