using System;
class ColorTheText
{
public static void Main(string [] args)
{
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("\t\tCongratulations! You have cleared this level. \n\n\t\t\t Entering Level 2...");
Console.ForegroundColor = ConsoleColor.White;
}
}
但我想从十六进制代码中获取颜色,即 ConsoleColor。颜色来自十六进制代码 (#c0c0c0)。怎么做?