Get color names from lookup table

Also adds tests for Color struct and fixes a bug
that had to do with equality.
This commit is contained in:
Patrik Svensson
2020-08-03 11:12:16 +02:00
committed by Patrik Svensson
parent f19202b427
commit 5267ebda49
6 changed files with 660 additions and 300 deletions

View File

@ -20,7 +20,7 @@ namespace Spectre.Console.Internal
continue;
}
var style = Lookup.Instance.GetStyle(part);
var style = StyleTable.GetStyle(part);
if (style != null)
{
if (effectiveStyle == null)
@ -32,7 +32,7 @@ namespace Spectre.Console.Internal
}
else
{
var color = Lookup.Instance.GetColor(part);
var color = ColorTable.GetColor(part);
if (color == null)
{
throw new InvalidOperationException("Could not find color..");