C# Class OpenBveApi.Colors.Color24

Represents a 24-bit color with red, green and blue channels at 8 bits each.
显示文件 Open project: leezer3/OpenBVE Class Usage Examples

Public Properties

Property Type Description
B byte
Black Color24
Blue Color24
Cyan Color24
G byte
Green Color24
Magenta Color24
R byte
Red Color24
White Color24
Yellow Color24

Public Methods

Method Description
Color24 ( byte r, byte g, byte b ) : System

Creates a new color.

CosineInterpolate ( Color24 Color1, Color24 Color2, double mu ) : Color24

Interpolates between two Color24 values using a simple Cosine algorithm

operator ( ) : bool

Checks whether two colors are equal.

Method Details

Color24() public method

Creates a new color.
public Color24 ( byte r, byte g, byte b ) : System
r byte The red component.
g byte The green component.
b byte The blue component.
return System

CosineInterpolate() public static method

Interpolates between two Color24 values using a simple Cosine algorithm
public static CosineInterpolate ( Color24 Color1, Color24 Color2, double mu ) : Color24
Color1 Color24 The first color
Color2 Color24 The second color
mu double The position on the curve of the new color
return Color24

operator() public static method

Checks whether two colors are equal.
public static operator ( ) : bool
return bool

Property Details

B public_oe property

The blue component.
public byte B
return byte

Black public_oe static_oe property

Represents a black color.
public static Color24,OpenBveApi.Colors Black
return Color24

Blue public_oe static_oe property

Represents a blue color.
public static Color24,OpenBveApi.Colors Blue
return Color24

Cyan public_oe static_oe property

Represents a cyan color.
public static Color24,OpenBveApi.Colors Cyan
return Color24

G public_oe property

The green component.
public byte G
return byte

Green public_oe static_oe property

Represents a green color.
public static Color24,OpenBveApi.Colors Green
return Color24

Magenta public_oe static_oe property

Represents a magenta color.
public static Color24,OpenBveApi.Colors Magenta
return Color24

R public_oe property

The red component.
public byte R
return byte

Red public_oe static_oe property

Represents a red color.
public static Color24,OpenBveApi.Colors Red
return Color24

White public_oe static_oe property

Represents a white color.
public static Color24,OpenBveApi.Colors White
return Color24

Yellow public_oe static_oe property

Represents a yellow color.
public static Color24,OpenBveApi.Colors Yellow
return Color24