mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-04-16 08:52: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/>
|
/// <inheritdoc/>
|
||||||
public bool Equals(Color other)
|
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>
|
/// <summary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user