Add check for IsDefault when comparing Colors

This commit is contained in:
AdmiringWorm 2020-08-07 08:08:05 +02:00 committed by Patrik Svensson
parent b0341862cf
commit 5cd9ece31a

View File

@ -82,7 +82,8 @@ namespace Spectre.Console
/// <inheritdoc/>
public bool Equals(Color other)
{
return R == other.R && G == other.G && B == other.B;
return (IsDefault && other.IsDefault) ||
(IsDefault == other.IsDefault && R == other.R && G == other.G && B == other.B);
}
/// <summary>