コード例 #1
0
 public static Color2 ArgbToKnownColor(int targetArgb)
 {
     EnsureColorTable();
     for (int index = 0; index < colorTable.Length; ++index)
     {
         int argb = colorTable[index];
         if (argb == targetArgb)
         {
             Color2 color = Color2.FromKnownColor((KnownColor)index);
             if (!color.IsSystemColor)
             {
                 return(color);
             }
         }
     }
     return(Color2.FromArgb(targetArgb));
 }