mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-02-19 07:47:11 +00:00
More refactoring
This commit is contained in:
@@ -4,12 +4,10 @@ namespace DiscordChatExporter.Domain.Internal
|
||||
{
|
||||
internal static class ColorExtensions
|
||||
{
|
||||
public static Color ResetAlpha(this Color color) => Color.FromArgb(1, color);
|
||||
public static Color WithAlpha(this Color color, int alpha) => Color.FromArgb(alpha, color);
|
||||
|
||||
public static Color ResetAlpha(this Color color) => color.WithAlpha(255);
|
||||
|
||||
public static int ToRgb(this Color color) => color.ToArgb() & 0xffffff;
|
||||
|
||||
public static string ToHexString(this Color color) => $"#{color.ToRgb():x6}";
|
||||
|
||||
public static string ToRgbString(this Color color) => $"{color.R}, {color.G}, {color.B}";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user