update colors and tweak layout caching