public static CssColor FromKnownColor(CssKnownColor kc) { int index = (int)kc; if (index < 0 || index > argbValues.Length) { return(CssColor.Black); } uint colorValue = argbValues[index]; return(new CssColor((byte)(colorValue >> 24), (byte)((colorValue >> 16) & 0xFF), (byte)((colorValue >> 8) & 0xFF), (byte)(colorValue & 0xFF))); }
public static string GetName(CssKnownColor kc) { return GetName((short)kc); }
public static CssColor FromKnownColor(CssKnownColor kc) { int index = (int)kc; if (index < 0 || index > argbValues.Length) { return CssColor.Black; } uint colorValue = argbValues[index]; return new CssColor((byte)(colorValue >> 24), (byte)((colorValue >> 16) & 0xFF), (byte)((colorValue >> 8) & 0xFF), (byte)(colorValue & 0xFF)); }
public static string GetName(CssKnownColor kc) { return(GetName((short)kc)); }