mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-04-14 16:02:50 +08:00
Add check for IsDefault when comparing Colors
This commit is contained in:
parent
b0341862cf
commit
5cd9ece31a
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user