Added a cache that stored for each definition color its corresponding closest terminal color. This way terminal color won't be computed from scratch each time a cell with that color should be displayed.