Fix #1327 Color.ToString returns wrong value (#1328)

* Match debugger display value

https://github.com/discord-net/Discord.Net/issues/1327

* Use string.format to convert raw value to hex

* Remove nested string.format
This commit is contained in:
Passive
2019-06-22 01:28:44 +10:00
committed by Monica S
parent a797be9ca0
commit 1e8aa080ab

View File

@@ -204,8 +204,8 @@ namespace Discord
/// A hexadecimal string of the color.
/// </returns>
public override string ToString() =>
$"#{Convert.ToString(RawValue, 16)}";
string.Format("#{0:X6}", RawValue);
private string DebuggerDisplay =>
$"#{Convert.ToString(RawValue, 16)} ({RawValue})";
string.Format("#{0:X6} ({0})", RawValue);
}
}