added option to override legend color