Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

色の混合

Color には、2 つの色をブレンドするために使用できる MixWith() メソッドがあります

ScottPlot.Plot myPlot = new();

Color color1 = Colors.Blue;
Color color2 = Colors.Green;

for (int i = 0; i < 10; i++)
{
    var circle = myPlot.Add.Circle(i, 0, 1);
    double fraction = (double)i / 10;
    circle.FillColor = color1.MixedWith(color2, fraction);
    circle.LineColor = Colors.Black;
}

myPlot.SavePng("demo.png", 400, 300);
このレシピは、カテゴリにある多数のレシピの 1 つです