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

Signed-off-by: Oleg Komarov <o.komarov11@imperial.ac.uk>
Merge remote-tracking branch 'okomarov/fixLegendEdgeColor'