Show / Hide Table of Contents

Class AtlasColor

Atlas Color

Inheritance
System.Object
AtlasColor
Implements
System.IEquatable<AtlasColor>
Namespace: MAT.Atlas.Api.Core
Assembly: MAT.Atlas.Api.Core.dll
Syntax
public sealed class AtlasColor : ValueType, IEquatable<AtlasColor>

Constructors

AtlasColor(Byte, Byte, Byte, Byte)

Initializes a new instance of the AtlasColor struct.

Declaration
public AtlasColor(byte a, byte r, byte g, byte b)
Parameters
Type Name Description
System.Byte a

The alpha value

System.Byte r

The red value

System.Byte g

The green value

System.Byte b

The blue value

AtlasColor(String)

Initializes a new instance of the AtlasColor struct.

Declaration
public AtlasColor(string color)
Parameters
Type Name Description
System.String color

The color.

Fields

Default

The default Atlas colour (Transparent).

Declaration
public static readonly AtlasColor Default
Field Value
Type Description
AtlasColor

Properties

A

Alpha Color.

Declaration
public byte A { get; }
Property Value
Type Description
System.Byte

B

Blue Color.

Declaration
public byte B { get; }
Property Value
Type Description
System.Byte

ColorValue

Color as a value.

Declaration
public uint ColorValue { get; }
Property Value
Type Description
System.UInt32

G

Green Color.

Declaration
public byte G { get; }
Property Value
Type Description
System.Byte

R

Red Color.

Declaration
public byte R { get; }
Property Value
Type Description
System.Byte

Value

The color as a string.

Declaration
public string Value { get; set; }
Property Value
Type Description
System.String

Methods

Equals(AtlasColor)

Determines whether the specified AtlasColor, is equal to this instance.

Declaration
public bool Equals(AtlasColor other)
Parameters
Type Name Description
AtlasColor other

The AtlasColor to compare with this instance.

Returns
Type Description
System.Boolean

true if the specified AtlasColor is equal to this instance; otherwise, false.

Equals(Object)

Determines whether the specified System.Object, is equal to this instance.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj

The System.Object to compare with this instance.

Returns
Type Description
System.Boolean

true if the specified System.Object is equal to this instance; otherwise, false.

GetContrastShade()

Returns black or white, whichever contrasts better with this color

Declaration
public AtlasColor GetContrastShade()
Returns
Type Description
AtlasColor

Black for a light color, white for a dark color

GetHashCode()

Returns a hash code for this instance.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

ToString()

Returns a System.String that represents this instance.

Declaration
public override string ToString()
Returns
Type Description
System.String

A System.String that represents this instance.

Operators

Equality(AtlasColor, AtlasColor)

Implements the operator ==.

Declaration
public static bool operator ==(AtlasColor color1, AtlasColor color2)
Parameters
Type Name Description
AtlasColor color1

The color1.

AtlasColor color2

The color2.

Returns
Type Description
System.Boolean

The result of the operator.

Inequality(AtlasColor, AtlasColor)

Implements the operator !=.

Declaration
public static bool operator !=(AtlasColor color1, AtlasColor color2)
Parameters
Type Name Description
AtlasColor color1

The color1.

AtlasColor color2

The color2.

Returns
Type Description
System.Boolean

The result of the operator.

Implements

System.IEquatable<>
In This Article
Back to top Generated by DocFX