Table of Contents

Method Mix3

Namespace
Gamelogic.Colors
Assembly
Gamelogic.Colors.dll

Mix3(IGenerator<Color>, IGenerator<Color>, IGenerator<Color>, float, IGenerator<int>, IGenerator<float>, IGenerator<float>, IGenerator<float>, ColorSpace)

Creates a generator that generates colors mixed from the colors generated by three given generators.

public static IGenerator<Color> Mix3(IGenerator<Color> color1, IGenerator<Color> color2, IGenerator<Color> color3, float greyControl, IGenerator<int> indexGenerator, IGenerator<float> mixFactor1, IGenerator<float> mixFactor2, IGenerator<float> mixFactor3, ColorSpace mixMode)

Parameters

color1 IGenerator<Color>

The first color to use in the mix.

color2 IGenerator<Color>

The second color to use in the mix.

color3 IGenerator<Color>

The third color to use in the mix.

greyControl float

A value between 0 and 1 that controls how grey colors can be if the mix is between pure red, green and blue. If 0, then only two colors are mixed at a time (and no grey is possible); if 1, all three colors are mixed together with equal probability (and so pure grey is possible)

indexGenerator IGenerator<int>

A generator that generates indices (0, 1, or 2) to use for the color to reduce in the mix (according to the value of the grey control).

mixFactor1 IGenerator<float>

A generator that determines the amount of color1 to use in the mix.

mixFactor2 IGenerator<float>

A generator that determines the amount of color2 to use in the mix.

mixFactor3 IGenerator<float>

A generator that determines the amount of color3 to use in the mix.

mixMode ColorSpace

The color space in which to mix.

Returns

IGenerator<Color>

Mix3(Color, Color, Color, float, ColorSpace)

Creates a generator that generates colors mixed from the given colors.

public static IGenerator<Color> Mix3(Color color1, Color color2, Color color3, float greyControl, ColorSpace mixMode)

Parameters

color1 Color

The first color to use in the mix.

color2 Color

The second color to use in the mix.

color3 Color

The third color to use in the mix.

greyControl float

A value between 0 and 1 that controls how grey colors can be if the mix is between pure red, green and blue. If 0, then only two colors are mixed at a time (and no grey is possible); if 1, all three colors are mixed together with equal probability (and so pure grey is possible)

mixMode ColorSpace

The color space in which to mix.

Returns

IGenerator<Color>