protected Colour(HexColour hexColour, RgbColour rgbColour, ConsoleColour consoleColour) { if (hexColour is null) { throw new ArgumentNullException(nameof(hexColour)); } if (rgbColour is null) { throw new ArgumentNullException(nameof(rgbColour)); } if (consoleColour is null) { throw new ArgumentNullException(nameof(consoleColour)); } HexColour = hexColour.Value; RgbColour = rgbColour.ToString(); ConsoleColor = consoleColour.Value; }
public override int GetHashCode() => HashCode.Combine( HexColour.GetHashCode(), RgbColour.GetHashCode(), ConsoleColor.GetHashCode());