Example #1
0
        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)));
        }
Example #2
0
 public static string GetName(CssKnownColor kc)
 {
     return GetName((short)kc);
 }
Example #3
0
 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));
 }
Example #4
0
 public static string GetName(CssKnownColor kc)
 {
     return(GetName((short)kc));
 }