Class NamedColorUtils
Static utility methods for working with dye colors
Inheritance
System.Object
NamedColorUtils
Assembly: Eco.Shared.dll
Syntax
public static class NamedColorUtils : Object
Fields
AllColors
Contains all generated named colors based on basic ones and the result of NamedColorGenerator
Declaration
public static readonly List<NamedColor> AllColors
Field Value
Type |
Description |
System.Collections.Generic.List<NamedColor> |
|
BaseColors
Table mapping every NamedColors type to its RGB value for rendering.
Declaration
public static readonly Dictionary<NamedColors, ByteColor> BaseColors
Field Value
GroupedColors
Declaration
public static readonly Dictionary<NamedColor, List<NamedColor>> GroupedColors
Field Value
Type |
Description |
System.Collections.Generic.Dictionary<NamedColor, System.Collections.Generic.List<NamedColor>> |
|
Methods
GetBaseColors()
Returns all base named colors
Declaration
public static List<ByteColor> GetBaseColors()
Returns
Type |
Description |
System.Collections.Generic.List<ByteColor> |
|
GetClosestColorName(ByteColor)
Gets closest name of a color.
Declaration
public static LocString GetClosestColorName(ByteColor color)
Parameters
Returns
GetClosestNamedColor(ByteColor)
Declaration
public static NamedColor GetClosestNamedColor(ByteColor requestedColor)
Parameters
Type |
Name |
Description |
ByteColor |
requestedColor |
|
Returns
GetNamedColor(NamedColors)
Declaration
public static ByteColor GetNamedColor(this NamedColors namedColor)
Parameters
Returns
GetRandomNamedColor()
Returns a random NamedColors from the available in "BASE" table.
Declaration
public static NamedColors GetRandomNamedColor()
Returns
GetRandomNamedColorAll()
Returns a random NamedColors from the available in "BLENDED" table.
Declaration
public static NamedColor GetRandomNamedColorAll()
Returns