style (component.legend) formatting and caching color var