Version 3.3.1.2

FancyColor struct

Namespace: Sirenix.OdinInspector.Editor.Internal
Assembly: Sirenix.OdinInspector.Editor
public struct FancyColor : IFormattable, IEquatable<FancyColor>

Constructors

FancyColor(Single, Single)
public FancyColor(float value, float a = 1F)
Parameters
System.Single value

System.Single a

FancyColor(Single, Single, Single, Single)
public FancyColor(float r, float g, float b, float a = 1F)
Parameters
System.Single r

System.Single g

System.Single b

System.Single a

Fields

A
public float A
B
public float B
BlendStack
public static readonly Stack<FancyColor.BlendLayer> BlendStack
EQUATABLE_THRESHOLD
public const float EQUATABLE_THRESHOLD = 0.00196078443F
G
public float G
R
public float R

Properties

Black
public static FancyColor Black { get; }
Blue
public static FancyColor Blue { get; }
ByteA
public byte ByteA { get; }
ByteB
public byte ByteB { get; }
ByteG
public byte ByteG { get; }
ByteR
public byte ByteR { get; }
Clear
public static FancyColor Clear { get; }
Cyan
public static FancyColor Cyan { get; }
Gray
public static FancyColor Gray { get; }
Green
public static FancyColor Green { get; }
Inverse
public FancyColor Inverse { get; }
InverseA
public float InverseA { get; }
InverseB
public float InverseB { get; }
InverseG
public float InverseG { get; }
InverseR
public float InverseR { get; }
Item[Int32]
public float this[int index] { get; set; }
Parameters
System.Int32 index

Magenta
public static FancyColor Magenta { get; }
Red
public static FancyColor Red { get; }
White
public static FancyColor White { get; }
Yellow
public static FancyColor Yellow { get; }

Methods

BakeBlends()
public FancyColor BakeBlends()
Returns
FancyColor

Blend(FancyColor, FancyColor.BlendMode)
public FancyColor Blend(FancyColor top, FancyColor.BlendMode blendMode)
Parameters
FancyColor top

FancyColor.BlendMode blendMode

Returns
FancyColor

Clamp()
public void Clamp()
Create32(Byte, Byte)
public static FancyColor Create32(byte value, byte a = 255)
Parameters
System.Byte value

System.Byte a

Returns
FancyColor

Create32(Byte, Byte, Byte, Byte)
public static FancyColor Create32(byte r, byte g, byte b, byte a = 255)
Parameters
System.Byte r

System.Byte g

System.Byte b

System.Byte a

Returns
FancyColor

CreateHex(Int32, Single)
public static FancyColor CreateHex(int rgb, float a = 1F)
Parameters
System.Int32 rgb

System.Single a

Returns
FancyColor

CreateHtmlString(String)
public static FancyColor CreateHtmlString(string htmlHex)
Parameters
System.String htmlHex

Returns
FancyColor

Deconstruct(out Single, out Single, out Single)
public void Deconstruct(out float r, out float g, out float b)
Parameters
System.Single r

System.Single g

System.Single b

Deconstruct(out Single, out Single, out Single, out Single)
public void Deconstruct(out float r, out float g, out float b, out float a)
Parameters
System.Single r

System.Single g

System.Single b

System.Single a

Equals(FancyColor)
public bool Equals(FancyColor other)
Parameters
FancyColor other

Returns
System.Boolean

Equals(Object)
public override bool Equals(object obj)
Parameters
System.Object obj

Returns
System.Boolean

Equals(Single, Int32)
public bool Equals(float value, int index)
Parameters
System.Single value

System.Int32 index

Returns
System.Boolean

EqualsA(Single)
public bool EqualsA(float value)
Parameters
System.Single value

Returns
System.Boolean

EqualsB(Single)
public bool EqualsB(float value)
Parameters
System.Single value

Returns
System.Boolean

EqualsG(Single)
public bool EqualsG(float value)
Parameters
System.Single value

Returns
System.Boolean

EqualsR(Single)
public bool EqualsR(float value)
Parameters
System.Single value

Returns
System.Boolean

GetHashCode()
public override int GetHashCode()
Returns
System.Int32

InvertLuminosity()
public FancyColor InvertLuminosity()
Returns
FancyColor

Lerp(FancyColor, Single)
public FancyColor Lerp(FancyColor target, float t)
Parameters
FancyColor target

System.Single t

Returns
FancyColor

Luminosity(Boolean)
public float Luminosity(bool includeAlpha = true)
Parameters
System.Boolean includeAlpha

Returns
System.Single

PopBlend()
public static void PopBlend()
PushBlend(FancyColor, FancyColor.BlendMode)
public static void PushBlend(FancyColor color, FancyColor.BlendMode blendMode)
Parameters
FancyColor color

FancyColor.BlendMode blendMode

ToHexCode()
public string ToHexCode()
Returns
System.String

ToString(String, IFormatProvider)
public string ToString(string format, IFormatProvider formatProvider)
Parameters
System.String format

System.IFormatProvider formatProvider

Returns
System.String

Operators

Addition(FancyColor, FancyColor)
public static FancyColor operator +(FancyColor self, FancyColor other)
Parameters
FancyColor self

FancyColor other

Returns
FancyColor

Equality(FancyColor, FancyColor)
public static bool operator ==(FancyColor self, FancyColor other)
Parameters
FancyColor self

FancyColor other

Returns
System.Boolean

GreaterThan(FancyColor, Single)
public static bool operator>(FancyColor self, float value)
Parameters
FancyColor self

System.Single value

Returns
System.Boolean

Implicit(FancyColor to Color)
public static implicit operator Color(FancyColor fancyColor)
Parameters
FancyColor fancyColor

Returns
UnityEngine.Color

Implicit(FancyColor to Color32)
public static implicit operator Color32(FancyColor fancyColor)
Parameters
FancyColor fancyColor

Returns
UnityEngine.Color32

Implicit(Color to FancyColor)
public static implicit operator FancyColor(Color color)
Parameters
UnityEngine.Color color

Returns
FancyColor

Implicit(Color32 to FancyColor)
public static implicit operator FancyColor(Color32 color32)
Parameters
UnityEngine.Color32 color32

Returns
FancyColor

Inequality(FancyColor, FancyColor)
public static bool operator !=(FancyColor self, FancyColor other)
Parameters
FancyColor self

FancyColor other

Returns
System.Boolean

LessThan(FancyColor, Single)
public static bool operator <(FancyColor self, float value)
Parameters
FancyColor self

System.Single value

Returns
System.Boolean

Multiply(FancyColor, FancyColor)
public static FancyColor operator *(FancyColor self, FancyColor other)
Parameters
FancyColor self

FancyColor other

Returns
FancyColor

Multiply(FancyColor, Single)
public static FancyColor operator *(FancyColor self, float value)
Parameters
FancyColor self

System.Single value

Returns
FancyColor

Multiply(Single, FancyColor)
public static FancyColor operator *(float value, FancyColor self)
Parameters
System.Single value

FancyColor self

Returns
FancyColor

Subtraction(FancyColor, FancyColor)
public static FancyColor operator -(FancyColor self, FancyColor other)
Parameters
FancyColor self

FancyColor other

Returns
FancyColor