mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-09-18 10:25:35 +08:00
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:

committed by
Patrik Svensson

parent
f19202b427
commit
5267ebda49
@@ -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..");
|
||||
|
Reference in New Issue
Block a user