[Fix #389] legend: handle EdgeColor and Color properly

Proper handling of `EdgeColor` and  `Color` in legend.