Show / Hide Table of Contents

Class Color

Inheritance
System.Object
Color
Implements
System.IEquatable<Color>
Namespace: Eco.Shared.Utils
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
public Color(string hex)
Parameters
Type Name Description
System.String hex

Fields

Black

Declaration
public static Color Black
Field Value
Type Description
Color

Blue

Declaration
public static Color Blue
Field Value
Type Description
Color

BlueGrey

Declaration
public static Color BlueGrey
Field Value
Type Description
Color

Brown

Declaration
public static Color Brown
Field Value
Type Description
Color

ClearBlack

Declaration
public static Color ClearBlack
Field Value
Type Description
Color

ClearWhite

Declaration
public static Color ClearWhite
Field Value
Type Description
Color

Cyan

Declaration
public static Color Cyan
Field Value
Type Description
Color

ForestGreen

Declaration
public static Color ForestGreen
Field Value
Type Description
Color

Green

Declaration
public static Color Green
Field Value
Type Description
Color

GreenGrey

Declaration
public static Color GreenGrey
Field Value
Type Description
Color

Grey

Declaration
public static Color Grey
Field Value
Type Description
Color

LightBlue

Declaration
public static Color LightBlue
Field Value
Type Description
Color

LightCyan

Declaration
public static Color LightCyan
Field Value
Type Description
Color

LightGreen

Declaration
public static Color LightGreen
Field Value
Type Description
Color

LightGrey

Declaration
public static Color LightGrey
Field Value
Type Description
Color

LightPurple

Declaration
public static Color LightPurple
Field Value
Type Description
Color

LightRed

Declaration
public static Color LightRed
Field Value
Type Description
Color

LightYellow

Declaration
public static Color LightYellow
Field Value
Type Description
Color

NeonGreen

Declaration
public static Color NeonGreen
Field Value
Type Description
Color

Orange

Declaration
public static Color Orange
Field Value
Type Description
Color

PaperGreen

Declaration
public static Color PaperGreen
Field Value
Type Description
Color

PaperWhite

Declaration
public static Color PaperWhite
Field Value
Type Description
Color

Red

Declaration
public static Color Red
Field Value
Type Description
Color

White

Declaration
public static Color White
Field Value
Type Description
Color

Yellow

Declaration
public static Color Yellow
Field Value
Type Description
Color

YellowGreen

Declaration
public static Color YellowGreen
Field Value
Type Description
Color

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
public int IntA { get; }
Property Value
Type Description
System.Int32

IntB

Declaration
public int IntB { get; }
Property Value
Type Description
System.Int32

IntG

Declaration
public int IntG { get; }
Property Value
Type Description
System.Int32

IntR

Declaration
public int IntR { get; }
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
Type Description
Color

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
Type Description
Color

RandEye()

Declaration
public static Color RandEye()
Returns
Type Description
Color

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
Type Description
Color

RandSkin()

Declaration
public static Color RandSkin()
Returns
Type Description
Color

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
Type Name Description
Color a
Color b
Returns
Type Description
Color

Equality(Color, Color)

Declaration
public static bool operator ==(Color a, Color b)
Parameters
Type Name Description
Color a
Color b
Returns
Type Description
System.Boolean

Inequality(Color, Color)

Declaration
public static bool operator !=(Color a, Color b)
Parameters
Type Name Description
Color a
Color b
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
Type Description
Color

Implements

System.IEquatable<>

Extension Methods

CommandLine.FeedFromCommandLine(Object)
CommandLine.ToCommandLineArgs(Object, Func<Object, Boolean>)
ListUtil.DepthFirstTraversal<T>(T, Func<T, IEnumerable<T>>)
EnumerableExtensions.SingleItemAsEnumerable<T>(T)
EventUtils.RaiseEvent<TEventArgs>(Object, String, TEventArgs)
PredicateUtils.MatchesAll<TEnumerable, T>(T, TEnumerable)
PredicateUtils.MatchesAll<T>(T, Func<T, Boolean>[])
PredicateUtils.MatchesAny<TEnumerable, T>(T, TEnumerable)
ReflectionUtils.PropertyValue<T>(Object, PropertyInfo)
ReflectionUtils.TryGetPropertyValueByName<T>(Object, String, out T)
ReflectionUtils.GetPropertyValueByName<T>(Object, String)
ReflectionUtils.SetPropertyByName(Object, String, Object)
ReflectionUtils.GetStructPropertyByName<T>(Object, String)
ReflectionUtils.GetStringPropertyByName(Object, String)
ReflectionUtils.ZipByProperty<T>(Object, Object, Object, Func<T, T, T>)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾