From 5cd9ece31a863f0288faa462f076471cd92008eb Mon Sep 17 00:00:00 2001 From: AdmiringWorm Date: Fri, 7 Aug 2020 08:08:05 +0200 Subject: [PATCH] Add check for IsDefault when comparing Colors --- src/Spectre.Console/Color.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Spectre.Console/Color.cs b/src/Spectre.Console/Color.cs index 93d6672..d2f0668 100644 --- a/src/Spectre.Console/Color.cs +++ b/src/Spectre.Console/Color.cs @@ -82,7 +82,8 @@ namespace Spectre.Console /// 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); } ///