From 1e8aa080abe555c23c68d8fac6e52c3cebacc092 Mon Sep 17 00:00:00 2001 From: Passive Date: Sat, 22 Jun 2019 01:28:44 +1000 Subject: [PATCH] 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 --- src/Discord.Net.Core/Entities/Roles/Color.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Discord.Net.Core/Entities/Roles/Color.cs b/src/Discord.Net.Core/Entities/Roles/Color.cs index 10bed840d..6bfead3d6 100644 --- a/src/Discord.Net.Core/Entities/Roles/Color.cs +++ b/src/Discord.Net.Core/Entities/Roles/Color.cs @@ -204,8 +204,8 @@ namespace Discord /// A hexadecimal string of the color. /// 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); } }