예제 #1
0
        private static void PrintSwatch(string name, Swatch swatch)
        {
            Color?color = swatch?.GetArgb();

            if (!color.HasValue)
            {
                Console.Write($"{name} has ");
                Console.ForegroundColor = ConsoleColor.Red;
                Console.Write("no");
                Console.ForegroundColor = ConsoleColor.White;
                Console.Write(" swatch\n");
            }
            else
            {
                Console.WriteLine($"{name}: {GetRgbHex(color)} - population: {swatch.GetPopulation()}");
                Console.WriteLine($"\ttext colors - title: {GetRgbHex(swatch.GetTitleTextColor())} - body: {GetRgbHex(swatch.GetBodyTextColor())}");
            }
        }
예제 #2
0
 private bool ShouldIgnoreColor(Swatch color)
 {
     return(ShouldIgnoreColor(color.GetArgb(), color.GetHsl()));
 }