Class Color
Inheritance
System.Object
Color
Assembly: Eco.Shared.dll
Syntax
public sealed class Color : ValueType, IEquatable<Color>
Constructors
Color(Color, Single)
Declaration
public Color(Color source, float a)
Parameters
Type |
Name |
Description |
Color |
source |
|
System.Single |
a |
|
Color(Vector3, Single)
Declaration
public Color(Vector3 source, float a = 1F)
Parameters
Type |
Name |
Description |
System.Numerics.Vector3 |
source |
|
System.Single |
a |
|
Color(Single, Single, Single, Single)
Declaration
public Color(float r, float g, float b, float a = 1F)
Parameters
Type |
Name |
Description |
System.Single |
r |
|
System.Single |
g |
|
System.Single |
b |
|
System.Single |
a |
|
Color(Single, Single, Single, Single, Boolean)
Declaration
public Color(float r, float g, float b, float a, bool normalize)
Parameters
Type |
Name |
Description |
System.Single |
r |
|
System.Single |
g |
|
System.Single |
b |
|
System.Single |
a |
|
System.Boolean |
normalize |
|
Color(String)
Declaration
Parameters
Type |
Name |
Description |
System.String |
hex |
|
Fields
Black
Declaration
public static Color Black
Field Value
Blue
Declaration
Field Value
BlueGrey
Declaration
public static Color BlueGrey
Field Value
Brown
Declaration
public static Color Brown
Field Value
ClearBlack
Declaration
public static Color ClearBlack
Field Value
ClearWhite
Declaration
public static Color ClearWhite
Field Value
Cyan
Declaration
Field Value
ForestGreen
Declaration
public static Color ForestGreen
Field Value
Green
Declaration
public static Color Green
Field Value
GreenGrey
Declaration
public static Color GreenGrey
Field Value
Grey
Declaration
Field Value
LightBlue
Declaration
public static Color LightBlue
Field Value
LightCyan
Declaration
public static Color LightCyan
Field Value
LightGreen
Declaration
public static Color LightGreen
Field Value
LightGrey
Declaration
public static Color LightGrey
Field Value
LightPurple
Declaration
public static Color LightPurple
Field Value
LightRed
Declaration
public static Color LightRed
Field Value
LightYellow
Declaration
public static Color LightYellow
Field Value
NeonGreen
Declaration
public static Color NeonGreen
Field Value
Orange
Declaration
public static Color Orange
Field Value
PaperGreen
Declaration
public static Color PaperGreen
Field Value
PaperWhite
Declaration
public static Color PaperWhite
Field Value
Red
Declaration
Field Value
White
Declaration
public static Color White
Field Value
Yellow
Declaration
public static Color Yellow
Field Value
YellowGreen
Declaration
public static Color YellowGreen
Field Value
Properties
A
Declaration
public float A { get; set; }
Property Value
Type |
Description |
System.Single |
|
B
Declaration
public float B { get; set; }
Property Value
Type |
Description |
System.Single |
|
G
Declaration
public float G { get; set; }
Property Value
Type |
Description |
System.Single |
|
HexRGB
Declaration
public string HexRGB { get; }
Property Value
Type |
Description |
System.String |
|
HexRGBA
Declaration
public string HexRGBA { get; }
Property Value
Type |
Description |
System.String |
|
IntA
Declaration
Property Value
Type |
Description |
System.Int32 |
|
IntB
Declaration
Property Value
Type |
Description |
System.Int32 |
|
IntG
Declaration
Property Value
Type |
Description |
System.Int32 |
|
IntR
Declaration
Property Value
Type |
Description |
System.Int32 |
|
IntRGB
Declaration
public string IntRGB { get; }
Property Value
Type |
Description |
System.String |
|
R
Declaration
public float R { get; set; }
Property Value
Type |
Description |
System.Single |
|
Random
Declaration
public static Color Random { get; }
Property Value
UInt
Declaration
public uint UInt { get; }
Property Value
Type |
Description |
System.UInt32 |
|
UIntUnit2y
Declaration
public uint UIntUnit2y { get; }
Property Value
Type |
Description |
System.UInt32 |
|
UIntUnity
Declaration
public uint UIntUnity { get; }
Property Value
Type |
Description |
System.UInt32 |
|
Methods
Equals(Color)
Declaration
public bool Equals(Color other)
Parameters
Type |
Name |
Description |
Color |
other |
|
Returns
Type |
Description |
System.Boolean |
|
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
Returns
Type |
Description |
System.Boolean |
|
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Lerp(Color, Single)
Declaration
public Color Lerp(Color other, float percent)
Parameters
Type |
Name |
Description |
Color |
other |
|
System.Single |
percent |
|
Returns
RandEye()
Declaration
public static Color RandEye()
Returns
RandomRange(Single, Single, Single)
Declaration
public static Color RandomRange(float rgbMin, float rgbMax, float a = 1F)
Parameters
Type |
Name |
Description |
System.Single |
rgbMin |
|
System.Single |
rgbMax |
|
System.Single |
a |
|
Returns
RandSkin()
Declaration
public static Color RandSkin()
Returns
Text(String)
Declaration
public string Text(string text)
Parameters
Type |
Name |
Description |
System.String |
text |
|
Returns
Type |
Description |
System.String |
|
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Operators
Addition(Color, Color)
Declaration
public static Color operator +(Color a, Color b)
Parameters
Returns
Equality(Color, Color)
Declaration
public static bool operator ==(Color a, Color b)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Inequality(Color, Color)
Declaration
public static bool operator !=(Color a, Color b)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Multiply(Color, Single)
Declaration
public static Color operator *(Color a, float x)
Parameters
Type |
Name |
Description |
Color |
a |
|
System.Single |
x |
|
Returns
Implements
System.IEquatable<>
Extension Methods