mirror of
https://github.com/spectreconsole/spectre.console.git
synced 2025-10-25 15:19:23 +00:00
Add check for IsDefault when comparing Colors
This commit is contained in:
committed by
Patrik Svensson
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>
|
||||||
|
|||||||
Reference in New Issue
Block a user