This extension is based on a similar work by @sergiirocks.
Color.FromArgb(int rgb)
Color.FromArgb(int r, int g, int b)
Color.FromArgb(int a, int r, int g, int b)
Color.?
KnownColor.?
Color.FromName("?")
new Color(float r, float g, float b)
new Color(float r, float g, float b, float a)
new Color32(byte r, byte g, byte b, byte a)
The float
and byte
overloads is meant to be used in Unity and allows the UnityEngine.
leading qualifier.
Every int
parameter works for decimal, binary and hex.
Target-typed new
expressions are supported for constructors.
Underscore (_
) digit separator is supported. Leading +
is supported. Leading argument name is supported.
See supported color names and their values for Color.?
, KnownColor.?
and Color.FromName("?")
here and here. That's all of them, except for Transparent
and Empty
, which does not make sense to be supported in this extension. Unity static colors are supported, but they will also misleadingly show up in non-Unity environments, as well as the other colors will misleadingly show up in Unity environments, since checking which environment is currently used would be a large work. System colors are not OS theme sensitive, their values are fixed based on the mono implementation.
If you have suggestions for how close-label could be improved, or want to report a bug, open an issue! We'd love all and any contributions.
For more, check out the Contributing Guide.
BTC: 1LoGErFoNzE1gCA5fzk6A82nV6iJdKssSZ