Method | Description | |
---|---|---|
BgraToUInt32 ( byte b, byte g, byte r, byte a ) : |
Packs color and alpha values into a 32-bit integer.
|
|
BgraToUInt32 ( int b, int g, int r, int a ) : |
Packs color and alpha values into a 32-bit integer.
|
|
Blend ( |
Smoothly blends between two colors.
|
|
Blend ( |
Smoothly blends the given colors together, assuming equal weighting for each one.
|
|
BlendColors4W16IP ( |
Blends four colors together based on the given weight values. The weights should be 16-bit fixed point numbers that add up to 65536 ("1.0"). 4W16IP means "4 colors, weights, 16-bit integer precision" |
|
BlendColorsWAIP ( |
Blends the colors based on the given weight values. "WAIP" stands for "weights, arbitrary integer precision" |
|
BlendColorsWFP ( |
Blends the colors based on the given weight values. "WAIP" stands for "weights, floating-point" |
|
ClampToByte ( double x ) : byte | ||
ClampToByte ( float x ) : byte | ||
ClampToByte ( int x ) : byte | ||
Equals ( object obj ) : bool |
Compares two ColorBgra instance to determine if they are equal.
|
|
FromBgr ( byte b, byte g, byte r ) : |
Creates a new ColorBgra instance with the given color values, and 255 for alpha.
|
|
FromBgra ( byte b, byte g, byte r, byte a ) : |
Creates a new ColorBgra instance with the given color and alpha values.
|
|
FromBgraClamped ( float b, float g, float r, float a ) : |
Creates a new ColorBgra instance with the given color and alpha values.
|
|
FromBgraClamped ( int b, int g, int r, int a ) : |
Creates a new ColorBgra instance with the given color and alpha values.
|
|
FromUInt32 ( |
Constructs a new ColorBgra instance with the given 32-bit value.
|
|
GetAverageColorChannelValue ( ) : byte |
Returns the average of the B, G, and R values. Alpha is ignored.
|
|
GetHashCode ( ) : int |
Returns a hash code for this color value.
|
|
GetIntensity ( ) : double |
Gets the luminance intensity of the pixel based on the values of the red, green, and blue components. Alpha is ignored.
|
|
GetIntensityByte ( ) : byte |
Gets the luminance intensity of the pixel based on the values of the red, green, and blue components. Alpha is ignored.
|
|
GetMaxColorChannelValue ( ) : byte |
Returns the maximum value out of the B, G, and R values. Alpha is ignored.
|
|
Lerp ( |
Linearly interpolates between two color values. This method does a simple lerp on each color value and on the alpha channel. It does not properly take into account the alpha channel's effect on color blending. |
|
Lerp ( |
Linearly interpolates between two color values. This method does a simple lerp on each color value and on the alpha channel. It does not properly take into account the alpha channel's effect on color blending. |
|
Lerp ( double from, double to, double frac ) : double | ||
Lerp ( float from, float to, float frac ) : float | ||
NewAlpha ( byte newA ) : |
Returns a new ColorBgra with the same color values but with a new alpha component value.
|
|
ParseHexString ( string hexString ) : |
||
ToHexString ( ) : string | ||
ToString ( ) : string | ||
operator ( ) : bool |
Compares two ColorBgra instance to determine if they are equal.
|
|
this ( int channel ) : byte |
Gets or sets the byte value of the specified color channel.
|
Method | Description | |
---|---|---|
FromRgb ( byte r, byte g, byte b ) : |
||
FromRgba ( byte r, byte g, byte b, byte a ) : |
public static BgraToUInt32 ( byte b, byte g, byte r, byte a ) : |
||
b | byte | |
g | byte | |
r | byte | |
a | byte | |
return |
public static BgraToUInt32 ( int b, int g, int r, int a ) : |
||
b | int | |
g | int | |
r | int | |
a | int | |
return |
public static Blend ( |
||
ca | ||
cb | ||
cbAlpha | byte | |
return |
public static Blend ( |
||
colors | ||
count | int | |
return |
public static BlendColors4W16IP ( |
||
c1 | ||
w1 | uint | |
c2 | ||
w2 | uint | |
c3 | ||
w3 | uint | |
c4 | ||
w4 | uint | |
return |
public static BlendColorsWAIP ( |
||
c | The array of color values. | |
w | uint | The array of weight values. |
return |
public static BlendColorsWFP ( |
||
c | The array of color values. | |
w | double | The array of weight values. |
return |
public static ClampToByte ( double x ) : byte | ||
x | double | |
return | byte |
public static FromBgr ( byte b, byte g, byte r ) : |
||
b | byte | |
g | byte | |
r | byte | |
return |
public static FromBgra ( byte b, byte g, byte r, byte a ) : |
||
b | byte | |
g | byte | |
r | byte | |
a | byte | |
return |
public static FromBgraClamped ( float b, float g, float r, float a ) : |
||
b | float | |
g | float | |
r | float | |
a | float | |
return |
public static FromBgraClamped ( int b, int g, int r, int a ) : |
||
b | int | |
g | int | |
r | int | |
a | int | |
return |
public static FromUInt32 ( |
||
bgra | ||
return |
public GetAverageColorChannelValue ( ) : byte | ||
return | byte |
public static Lerp ( |
||
from | The color value that represents 0 on the lerp number line. | |
to | The color value that represents 1 on the lerp number line. | |
frac | double | A value in the range [0, 1]. |
return |
public static Lerp ( |
||
from | The color value that represents 0 on the lerp number line. | |
to | The color value that represents 1 on the lerp number line. | |
frac | float | A value in the range [0, 1]. |
return |
public static Lerp ( double from, double to, double frac ) : double | ||
from | double | |
to | double | |
frac | double | |
return | double |
public static Lerp ( float from, float to, float frac ) : float | ||
from | float | |
to | float | |
frac | float | |
return | float |
public static ParseHexString ( string hexString ) : |
||
hexString | string | |
return |