The Colors class provides operations on 64-bit A16R16G16B16 linear sRGB color values.
static class
|
Colors
|
The binary layout of a 64-bit color value is this:
red blue /``\ /``\ MSB - 0xAAAARRRRGGGGBBBB - LSB \__/ \__/ alpha green alpha : [0..65535], bitmask 0xFFFF000000000000 red : [0..65535], bitmask 0x0000FFFF00000000 green : [0..65535], bitmask 0x00000000FFFF0000 blue : [0..65535], bitmask 0x000000000000FFFF
The
16-bit
color
channel
values
(red,
green
and
blue)
are
expected
to
be
specified
in
linear
sRGB
color
space
(e.g.
without
gamma
compression),
where
0
and
65535
are
linearly
mapped
to
the
values
0
and
1
,
respectively.
This
assumption
is
necessary,
since
the
Colors
class
uses
linear
arithmetic
on
color
channel
values.
The
8-bit
(or
less)
color
channel
values
are
expected
to
be
specified
in
compressed
sRGB
color
space
(i.e.
with
gamma
compression).
Automatic
decompression
resp.
compression
will
be
performed
where
necessary;
the
documentation
points
that
out
at
each
spot
(for
example,
see
the
Encode*
and
Decode*
methods).
Alpha
channel
values
are
always
treated
as
linear,
thus
automatic
gamma
compression
resp.
decompression
will
never
be
performed.
The
16-bit
color
channel
values
0
and
65535
are
simply
mapped
to
the
linear
values
0
and
1
,
respectively.
The
color
constants
defined
by
this
class
have
an
alpha
channel
value
of
65535
by
default
(i.e.
fully
opaque),
unless
stated
otherwise.
The configurator object for this type.
public
static
property
|
Config
{
get
}
|
||
type
|
IConfigurator<int64>
|
||
value
|
|
The configurator object. |
The configurator object for the color name enumeration.
public
static
readonly
field
|
ConfigColorName
|
||
type
|
IConfigurator<int64>
|
The configurator object for ColorOp.
public
static
readonly
field
|
ConfigColorOp
|
||
type
|
IConfigurator<ColorOp>
|
The color 'AliceBlue' (HTML #F0F8FF).
public
constant
|
AliceBlue
=
-36206837628929
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'AntiqueWhite' (HTML #FAEBD7).
public
constant
|
AntiqueWhite
=
-12391707464202
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Aqua' (HTML #00FFFF).
public
constant
|
Aqua
=
-281470681743361
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Aquamarine' (HTML #7FFFD4).
public
constant
|
Aquamarine
=
-221731981645685
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Azure' (HTML #F0FFFF).
public
constant
|
Azure
=
-36206574305281
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Beige' (HTML #F5F5DC).
public
constant
|
Beige
=
-24460211996873
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Bisque' (HTML #FFE4C4).
public
constant
|
Bisque
=
-962818736
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Black' (HTML #000000).
public
constant
|
Black
=
-281474976710656
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'BlanchedAlmond' (HTML #FFEBCD).
public
constant
|
BlanchedAlmond
=
-726819767
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Blue' (HTML #0000FF).
public
constant
|
Blue
=
-281474976645121
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'BlueViolet' (HTML #8A2BE2).
public
constant
|
BlueViolet
=
-209937897635151
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Brown' (HTML #A52A2A).
public
constant
|
Brown
=
-175569573706259
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'BurlyWood' (HTML #DEB887).
public
constant
|
BurlyWood
=
-75868538651130
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'CadetBlue' (HTML #5F9EA0).
public
constant
|
CadetBlue
=
-249261253502466
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Chartreuse' (HTML #7FFF00).
public
constant
|
Chartreuse
=
-221731981688832
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Chocolate' (HTML #D2691E).
public
constant
|
Chocolate
=
-100072131263661
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Coral' (HTML #FF7F50).
public
constant
|
Coral
=
-3383421815
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'CornflowerBlue' (HTML #6495ED).
public
constant
|
CornflowerBlue
=
-245602119001908
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Cornsilk' (HTML #FFF8DC).
public
constant
|
Cornsilk
=
-263342281
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Crimson' (HTML #DC143C).
public
constant
|
Crimson
=
-80028095607919
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Cyan' (HTML #00FFFF).
public
constant
|
Cyan
=
-281470681743361
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'DarkBlue' (HTML #00008B).
public
constant
|
DarkBlue
=
-281474976693736
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'DarkCyan' (HTML #008B8B).
public
constant
|
DarkCyan
=
-281473867824616
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'DarkGoldenrod' (HTML #B8860B).
public
constant
|
DarkGoldenrod
=
-146560440139557
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'DarkGray' (HTML #A9A9A9).
public
constant
|
DarkGray
=
-169799828019823
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'DarkGreen' (HTML #006400).
public
constant
|
DarkGreen
=
-281474429353984
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'DarkKhaki' (HTML #BDB76B).
public
constant
|
DarkKhaki
=
-138235783600733
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'DarkMagenta' (HTML #8B008B).
public
constant
|
DarkMagenta
=
-208804130045416
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'DarkOliveGreen' (HTML #556B2F).
public
constant
|
DarkOliveGreen
=
-255906404956345
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'DarkOrange' (HTML #FF8C00).
public
constant
|
DarkOrange
=
-3168600064
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'DarkOrchid' (HTML #9932CC).
public
constant
|
DarkOrchid
=
-191813102429548
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'DarkRed' (HTML #8B0000).
public
constant
|
DarkRed
=
-208804130062336
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'DarkSalmon' (HTML #E9967A).
public
constant
|
DarkSalmon
=
-52118118256174
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'DarkSeaGreen' (HTML #8FBC8B).
public
constant
|
DarkSeaGreen
=
-204159110528488
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'DarkSlateBlue' (HTML #483D8B).
public
constant
|
DarkSlateBlue
=
-263234050178536
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'DarkSlateGray' (HTML #2F4F4F).
public
constant
|
DarkSlateGray
=
-273473116826620
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'DarkTurquoise' (HTML #00CED1).
public
constant
|
DarkTurquoise
=
-281472325803207
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'DarkViolet' (HTML #9400D3).
public
constant
|
DarkViolet
=
-198122546354494
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'DeepPink' (HTML #FF1493).
public
constant
|
DeepPink
=
-4264932687
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'DeepSkyBlue' (HTML #00BFFF).
public
constant
|
DeepSkyBlue
=
-281472739049473
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'DimGray' (HTML #696969).
public
constant
|
DimGray
=
-241711562742742
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'DodgerBlue' (HTML #1E90FF).
public
constant
|
DodgerBlue
=
-277818761674753
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Firebrick' (HTML #B22222).
public
constant
|
Firebrick
=
-156164942199784
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'FloralWhite' (HTML #FFFAF0).
public
constant
|
FloralWhite
=
-189079791
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'ForestGreen' (HTML #228B22).
public
constant
|
ForestGreen
=
-276972742114280
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Gainsboro' (HTML #DCDCDC).
public
constant
|
Gainsboro
=
-80025051744457
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'GhostWhite' (HTML #F8F8FF).
public
constant
|
GhostWhite
=
-17257441918977
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Gold' (HTML #FFD700).
public
constant
|
Gold
=
-1376387072
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Goldenrod' (HTML #DAA520).
public
constant
|
Goldenrod
=
-84132498373709
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Gray' (HTML #808080).
public
constant
|
Gray
=
-220717442255038
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Green' (HTML #008000).
public
constant
|
Green
=
-281474049638400
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'GreenYellow' (HTML #ADFF2F).
public
constant
|
GreenYellow
=
-163848707438777
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Honeydew' (HTML #F0FFF0).
public
constant
|
Honeydew
=
-36206574313711
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'HotPink' (HTML #FF69B4).
public
constant
|
HotPink
=
-3688205097
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'IndianRed' (HTML #CD5C5C).
public
constant
|
IndianRed
=
-109637170488474
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Indigo' (HTML #4B0082).
public
constant
|
Indigo
=
-261670882494171
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Ivory' (HTML #FFFFF0).
public
constant
|
Ivory
=
-8431
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Khaki' (HTML #F0E68C).
public
constant
|
Khaki
=
-36207470689501
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Lavender' (HTML #E6E6FA).
public
constant
|
Lavender
=
-58743164046150
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'LavenderBlush' (HTML #FFF0F5).
public
constant
|
LavenderBlush
=
-552474176
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'LawnGreen' (HTML #7CFC00).
public
constant
|
LawnGreen
=
-224738572828672
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'LemonChiffon' (HTML #FFFACD).
public
constant
|
LemonChiffon
=
-189096887
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'LightBlue' (HTML #ADD8E6).
public
constant
|
LightBlue
=
-163850053039470
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'LightCoral' (HTML #F08080).
public
constant
|
LightCoral
=
-36209942186174
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'LightCyan' (HTML #E0FFFF).
public
constant
|
LightCyan
=
-71661529333761
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'LightGoldenrodYellow' (HTML #FAFAD2).
public
constant
|
LightGoldenrodYellow
=
-12391169743620
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'LightGray' (HTML #D3D3D3).
public
constant
|
LightGray
=
-98120025069886
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'LightGreen' (HTML #90EE90).
public
constant
|
LightGreen
=
-202972187310235
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'LightPink' (HTML #FFB6C1).
public
constant
|
LightPink
=
-2285860732
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'LightSalmon' (HTML #FFA07A).
public
constant
|
LightSalmon
=
-2785136174
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'LightSeaGreen' (HTML #20B2AA).
public
constant
|
LightSeaGreen
=
-277405730576664
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'LightSkyBlue' (HTML #87CEFA).
public
constant
|
LightSkyBlue
=
-213276835056454
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'LightSlateGray' (HTML #778899).
public
constant
|
LightSlateGray
=
-229547764657780
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'LightSteelBlue' (HTML #B0C4DE).
public
constant
|
LightSteelBlue
=
-159272196326657
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'LightYellow' (HTML #FFFFE0).
public
constant
|
LightYellow
=
-16686
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Lime' (HTML #00FF00).
public
constant
|
Lime
=
-281470681808896
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'LimeGreen' (HTML #32CD32).
public
constant
|
LimeGreen
=
-272495873030102
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Linen' (HTML #FAF0E6).
public
constant
|
Linen
=
-12391533131118
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Magenta' (HTML #FF00FF).
public
constant
|
Magenta
=
-4294901761
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Maroon' (HTML #800000).
public
constant
|
Maroon
=
-220718369341440
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'MediumAquamarine' (HTML #66CDAA).
public
constant
|
MediumAquamarine
=
-244071779440920
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'MediumBlue' (HTML #0000CD).
public
constant
|
MediumBlue
=
-281474976670647
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'MediumOrchid' (HTML #BA55D3).
public
constant
|
MediumOrchid
=
-143266833914174
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'MediumPurple' (HTML #9370DB).
public
constant
|
MediumPurple
=
-199350211070633
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'MediumSeaGreen' (HTML #3CB371).
public
constant
|
MediumSeaGreen
=
-268755642471866
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'MediumSlateBlue' (HTML #7B68EE).
public
constant
|
MediumSlateBlue
=
-225725706609952
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'MediumSpringGreen' (HTML #00FA9A).
public
constant
|
MediumSpringGreen
=
-281470870859079
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'MediumTurquoise' (HTML #48D1CC).
public
constant
|
MediumTurquoise
=
-263231512143212
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'MediumVioletRed' (HTML #C71585).
public
constant
|
MediumVioletRed
=
-120718613595125
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'MidnightBlue' (HTML #191970).
public
constant
|
MidnightBlue
=
-278739040786053
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'MintCream' (HTML #F5FFFA).
public
constant
|
MintCream
=
-24459838753606
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'MistyRose' (HTML #FFE4E1).
public
constant
|
MistyRose
=
-962805568
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Moccasin' (HTML #FFE4B5).
public
constant
|
Moccasin
=
-962824630
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'NavajoWhite' (HTML #FFDEAD).
public
constant
|
NavajoWhite
=
-1157666054
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Navy' (HTML #000080).
public
constant
|
Navy
=
-281474976696510
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'OldLace' (HTML #FDF5E6).
public
constant
|
OldLace
=
-4995420206446
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Olive' (HTML #808000).
public
constant
|
Olive
=
-220717442269184
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'OliveDrab' (HTML #6B8E23).
public
constant
|
OliveDrab
=
-240091805055923
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Opaque0' (HTML #FFFFFF, Alpha 0%).
public
constant
|
Opaque0
=
281474976710655
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Use bitwise AND on opaque color value to set the alpha channel to 0%.
The color 'Opaque05' (HTML #FFFFFF, Alpha 5%).
public
constant
|
Opaque05
=
940689372167012351
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Use bitwise AND on opaque color value to set the alpha channel to 5%.
The color 'Opaque10' (HTML #FFFFFF, Alpha 10%).
public
constant
|
Opaque10
=
1881097269357314047
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Use bitwise AND on opaque color value to set the alpha channel to 10%.
The color 'Opaque15' (HTML #FFFFFF, Alpha 15%).
public
constant
|
Opaque15
=
2749166097532977151
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Use bitwise AND on opaque color value to set the alpha channel to 15%.
The color 'Opaque20' (HTML #FFFFFF, Alpha 20%).
public
constant
|
Opaque20
=
3689573994723278847
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Use bitwise AND on opaque color value to set the alpha channel to 20%.
The color 'Opaque25' (HTML #FFFFFF, Alpha 25%).
public
constant
|
Opaque25
=
4629981891913580543
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Use bitwise AND on opaque color value to set the alpha channel to 25%.
The color 'Opaque30' (HTML #FFFFFF, Alpha 30%).
public
constant
|
Opaque30
=
5570389789103882239
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Use bitwise AND on opaque color value to set the alpha channel to 30%.
The color 'Opaque35' (HTML #FFFFFF, Alpha 35%).
public
constant
|
Opaque35
=
6438458617279545343
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Use bitwise AND on opaque color value to set the alpha channel to 35%.
The color 'Opaque40' (HTML #FFFFFF, Alpha 40%).
public
constant
|
Opaque40
=
7378866514469847039
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Use bitwise AND on opaque color value to set the alpha channel to 40%.
The color 'Opaque45' (HTML #FFFFFF, Alpha 45%).
public
constant
|
Opaque45
=
8319274411660148735
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Use bitwise AND on opaque color value to set the alpha channel to 45%.
The color 'Opaque50' (HTML #FFFFFF, Alpha 50%).
public
constant
|
Opaque50
=
-9187061764859101185
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Use bitwise AND on opaque color value to set the alpha channel to 50%.
The color 'Opaque55' (HTML #FFFFFF, Alpha 55%).
public
constant
|
Opaque55
=
-8318992936683438081
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Use bitwise AND on opaque color value to set the alpha channel to 55%.
The color 'Opaque60' (HTML #FFFFFF, Alpha 60%).
public
constant
|
Opaque60
=
-7378585039493136385
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Use bitwise AND on opaque color value to set the alpha channel to 60%.
The color 'Opaque65' (HTML #FFFFFF, Alpha 65%).
public
constant
|
Opaque65
=
-6438177142302834689
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Use bitwise AND on opaque color value to set the alpha channel to 65%.
The color 'Opaque70' (HTML #FFFFFF, Alpha 70%).
public
constant
|
Opaque70
=
-5497769245112532993
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Use bitwise AND on opaque color value to set the alpha channel to 70%.
The color 'Opaque75' (HTML #FFFFFF, Alpha 75%).
public
constant
|
Opaque75
=
-4629700416936869889
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Use bitwise AND on opaque color value to set the alpha channel to 75%.
The color 'Opaque80' (HTML #FFFFFF, Alpha 80%).
public
constant
|
Opaque80
=
-3689292519746568193
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Use bitwise AND on opaque color value to set the alpha channel to 80%.
The color 'Opaque85' (HTML #FFFFFF, Alpha 85%).
public
constant
|
Opaque85
=
-2748884622556266497
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Use bitwise AND on opaque color value to set the alpha channel to 85%.
The color 'Opaque90' (HTML #FFFFFF, Alpha 90%).
public
constant
|
Opaque90
=
-1808476725365964801
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Use bitwise AND on opaque color value to set the alpha channel to 90%.
The color 'Opaque95' (HTML #FFFFFF, Alpha 95%).
public
constant
|
Opaque95
=
-940407897190301697
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Use bitwise AND on opaque color value to set the alpha channel to 95%.
The color 'Orange' (HTML #FFA500).
public
constant
|
Orange
=
-2678980608
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'OrangeRed' (HTML #FF4500).
public
constant
|
OrangeRed
=
-4039376896
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Orchid' (HTML #DA70D6).
public
constant
|
Orchid
=
-84133418390491
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'PaleGoldenrod' (HTML #EEE8AA).
public
constant
|
PaleGoldenrod
=
-40815903349016
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'PaleGreen' (HTML #98FB98).
public
constant
|
PaleGreen
=
-193093291388831
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'PaleTurquoise' (HTML #AFEEEE).
public
constant
|
PaleTurquoise
=
-160808493327648
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'PaleVioletRed' (HTML #DB7093).
public
constant
|
PaleVioletRed
=
-82089013982543
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'PapayaWhip' (HTML #FFEFD5).
public
constant
|
PapayaWhip
=
-587748778
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'PeachPuff' (HTML #FFDAB9).
public
constant
|
PeachPuff
=
-1283752910
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Peru' (HTML #CD853F).
public
constant
|
Peru
=
-109636622807878
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Pink' (HTML #FFC0CB).
public
constant
|
Pink
=
-2031052574
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Plum' (HTML #DDA0DD).
public
constant
|
Plum
=
-77956441523943
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'PowderBlue' (HTML #B0E0E6).
public
constant
|
PowderBlue
=
-159271365719406
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Purple' (HTML #800080).
public
constant
|
Purple
=
-220718369327294
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Red' (HTML #FF0000).
public
constant
|
Red
=
-4294967296
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'RosyBrown' (HTML #BC8F8F).
public
constant
|
RosyBrown
=
-139924559804847
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'RoyalBlue' (HTML #4169E1).
public
constant
|
RoyalBlue
=
-266596603215680
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'SaddleBrown' (HTML #8B4513).
public
constant
|
SaddleBrown
=
-208803874471509
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Salmon' (HTML #FA8072).
public
constant
|
Salmon
=
-12394348532972
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'SandyBrown' (HTML #F4A460).
public
constant
|
SandyBrown
=
-26837656199694
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'SeaGreen' (HTML #2E8B57).
public
constant
|
SeaGreen
=
-273785876375450
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'SeaShell' (HTML #FFF5EE).
public
constant
|
SeaShell
=
-373237024
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Sienna' (HTML #A0522D).
public
constant
|
Sienna
=
-182527157729608
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Silver' (HTML #C0C0C0).
public
constant
|
Silver
=
-133107362527504
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'SkyBlue' (HTML #87CEEB).
public
constant
|
SkyBlue
=
-213276835064659
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'SlateBlue' (HTML #6A5ACD).
public
constant
|
SlateBlue
=
-240908571468727
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'SlateGray' (HTML #708090).
public
constant
|
SlateGray
=
-235865791903899
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Snow' (HTML #FFFAFA).
public
constant
|
Snow
=
-189074246
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'SoylentGreen' (HTML #849537).
public
constant
|
SoylentGreen
=
-216525190460984
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
No living beings have been harmed during the creation of this color.
The color 'SpringGreen' (HTML #00FF7F).
public
constant
|
SpringGreen
=
-281470681794987
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'SteelBlue' (HTML #4682B4).
public
constant
|
SteelBlue
=
-264234019228457
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Tan' (HTML #D2B48C).
public
constant
|
Tan
=
-100070777732317
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Teal' (HTML #008080).
public
constant
|
Teal
=
-281474049624254
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Thistle' (HTML #D8BFD8).
public
constant
|
Thistle
=
-88190620815414
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Tomato' (HTML #FF6347).
public
constant
|
Tomato
=
-3759075295
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Turquoise' (HTML #40E0D0).
public
constant
|
Turquoise
=
-267040685121159
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Violet' (HTML #EE82EE).
public
constant
|
Violet
=
-40818410399008
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Wheat' (HTML #F5DEB3).
public
constant
|
Wheat
=
-24460996414618
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'White' (HTML #FFFFFF).
public
constant
|
White
=
-1
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'WhiteSmoke' (HTML #F5F5F5).
public
constant
|
WhiteSmoke
=
-24460211983936
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Yellow' (HTML #FFFF00).
public
constant
|
Yellow
=
-65536
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'YellowGreen' (HTML #9ACD32).
public
constant
|
YellowGreen
=
-190517832251350
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
The color 'Zero' (HTML #000000, Alpha 0%).
public
constant
|
Zero
=
0
|
||
type
|
int64
|
Remarks:
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Fully transparent black.
Adds the given color values (see Add).
[Pure]
|
||||
public
static
method
|
Add
(int64 a,
int64 b)
|
|||
type
|
int64
|
|||
params
|
a
|
First color value. | ||
b
|
Second color value. | |||
returns
|
The resulting color value. |
Adjusts
saturation
and
brightness
in
HSV
color
space.
[Pure]
|
||||
public
static
method
|
Adjust
(int64 color,
int32 factorBrightness,
int32 factorSaturation = 0)
|
|||
type
|
int64
|
|||
params
|
color
|
The input color. | ||
factorBrightness
|
The
brightness
adjustment
factor
in
the
range
[-1000..1000] .
|
|||
factorSaturation
|
The
saturation
adjustment
factor
in
the
range
[-1000..1000] .
Defaults
to
0 .
|
|||
returns
|
The resulting color value. |
Remarks:
An
adjustment
factor
of
-1000
will
set
the
brightness
resp.
saturation
to
0
,
a
factor
of
1000
will
set
them
to
65535
.
The
default
factor
0
preserves
the
brightness
resp.
saturation
value
of
the
color.
Values
in
between
are
interpolated.
Replaces the alpha component of the given color.
[Pure]
|
||||
public
static
method
|
Alpha
(int32 alpha16,
int64 color = White)
|
|||
type
|
int64
|
|||
params
|
alpha16
|
The new alpha channel, in the range [0..65535]. | ||
color
|
The color. Defaults to White. | |||
returns
|
The resulting color. |
Returns the alpha channel of the given color value.
[Pure]
|
||||
public
static
method
|
AlphaF
(int64 color)
|
|||
type
|
float32
|
|||
params
|
color
|
The color value. | ||
returns
|
|
The floating point channel value. |
Returns the alpha channel of the given color value.
[Pure]
|
||||
public
static
method
|
AlphaI
(int64 color)
|
|||
type
|
int32
|
|||
params
|
color
|
The color value. | ||
returns
|
|
The channel value. |
Returns the alpha channel of the given color value.
[Pure]
|
||||
public
static
method
|
AlphaI8
(int64 color)
|
|||
type
|
int32
|
|||
params
|
color
|
The color value. | ||
returns
|
|
The channel value. |
Blends the given colors (b over a, see Blend).
[Pure]
|
||||
public
static
method
|
Blend
(int64 a,
int64 b)
|
|||
type
|
int64
|
|||
params
|
a
|
First color to blend. | ||
b
|
Second color to blend. | |||
returns
|
The resulting color. |
Returns the blue channel of the given color value.
[Pure]
|
||||
public
static
method
|
BlueF
(int64 color)
|
|||
type
|
float32
|
|||
params
|
color
|
The color value. | ||
returns
|
|
The channel value (linear sRGB). |
Returns the blue channel of the given color value.
[Pure]
|
||||
public
static
method
|
BlueI
(int64 color)
|
|||
type
|
int32
|
|||
params
|
color
|
The color value. | ||
returns
|
|
The channel value (linear sRGB). |
Returns the blue channel of the given color value.
[Pure]
|
||||
public
static
method
|
BlueI8
(int64 color)
|
|||
type
|
int32
|
|||
params
|
color
|
The color value. | ||
returns
|
|
The channel value (compressed sRGB). |
Decodes the given 64-bit A16R16G16B16 linear resp. compressed sRGB color value.
[Pure]
|
||||
public
static
method
|
Decode_A16R16G16B16
(int64 color,
bool srgb = true)
|
|||
type
|
int64
|
|||
params
|
color
|
The color value to decode. | ||
srgb
|
Is
color
sRGB
compressed
(true )
or
sRGB
linear
(false )?
Defaults
to
true .
|
|||
returns
|
The 64-bit A16R16G16B16 linear sRGB color value. |
Decodes the given 16-bit A1R5G5B5 linear resp. compressed sRGB color value.
[Pure]
|
||||
public
static
method
|
Decode_A1R5G5B5
(int32 color,
bool srgb = true)
|
|||
type
|
int64
|
|||
params
|
color
|
The color value to decode. | ||
srgb
|
Is
color
sRGB
compressed
(true )
or
sRGB
linear
(false )?
Defaults
to
true .
|
|||
returns
|
The 64-bit A16R16G16B16 linear sRGB color value. |
Decodes the given 16-bit A4R4G4B4 linear resp. compressed sRGB color value.
[Pure]
|
||||
public
static
method
|
Decode_A4R4G4B4
(int32 color,
bool srgb = true)
|
|||
type
|
int64
|
|||
params
|
color
|
The color value to decode. | ||
srgb
|
Is
color
sRGB
compressed
(true )
or
sRGB
linear
(false )?
Defaults
to
true .
|
|||
returns
|
The 64-bit A16R16G16B16 linear sRGB color value. |
Decodes the given 32-bit A8R8G8B8 linear resp. compressed sRGB color value.
[Pure]
|
||||
public
static
method
|
Decode_A8R8G8B8
(int32 color,
bool srgb = true)
|
|||
type
|
int64
|
|||
params
|
color
|
The color value to decode. | ||
srgb
|
Is
color
sRGB
compressed
(true )
or
sRGB
linear
(false )?
Defaults
to
true .
|
|||
returns
|
The 64-bit A16R16G16B16 linear sRGB color value. |
Decodes the given 24-bit B8G8R8 linear resp. compressed sRGB color value.
[Pure]
|
||||
public
static
method
|
Decode_B8G8R8
(int32 color,
bool srgb = true)
|
|||
type
|
int64
|
|||
params
|
color
|
The color value to decode. | ||
srgb
|
Is
color
sRGB
compressed
(true )
or
sRGB
linear
(false )?
Defaults
to
true .
|
|||
returns
|
The 64-bit A16R16G16B16 linear sRGB color value. |
Decodes the given 16-bit R5G6B5 linear resp. compressed sRGB color value.
[Pure]
|
||||
public
static
method
|
Decode_R5G6B5
(int32 color,
bool srgb = true)
|
|||
type
|
int64
|
|||
params
|
color
|
The color value to decode. | ||
srgb
|
Is
color
sRGB
compressed
(true )
or
sRGB
linear
(false )?
Defaults
to
true .
|
|||
returns
|
The 64-bit A16R16G16B16 linear sRGB color value. |
Decodes the given 24-bit R8G8B8 linear resp. compressed sRGB color value.
[Pure]
|
||||
public
static
method
|
Decode_R8G8B8
(int32 color,
bool srgb = true)
|
|||
type
|
int64
|
|||
params
|
color
|
The color value to decode. | ||
srgb
|
Is
color
sRGB
compressed
(true )
or
sRGB
linear
(false )?
Defaults
to
true .
|
|||
returns
|
The 64-bit A16R16G16B16 linear sRGB color value. |
Computes the distance between the given colors.
[Pure]
|
||||
public
static
method
|
Distance_HSV_HSV
(int64 hsvA,
int64 hsvB)
|
|||
type
|
float64
|
|||
params
|
hsvA
|
First color, in HSV space (see ToHSV). | ||
hsvB
|
Second color, in HSV space (see ToHSV). | |||
returns
|
|
The color distance. |
Remarks:
The color distance is defined as the maximum of these terms:
Pa
and
Pb
on
the
chroma
disc:
90° _.------. ,-'' `--. ,' Pb `. / \ \ ; \ : 180° | O-----------Pa 0° : ; \ / `. ,' '--. _.-' `------'' 270°The color hue defines the direction of the vector pointing from
O
to
P*
.
The
length
of
the
vector
is
given
by
the
product
of
color
brightness
and
saturation,
both
in
normalized
range
[0..1].
Computes the distance between the given colors.
[Pure]
|
||||
public
static
method
|
Distance_HSV_RGB
(int64 hsvA,
int64 colorB)
|
|||
type
|
float64
|
|||
params
|
hsvA
|
First color, in HSV space (see ToHSV). | ||
colorB
|
Second color. | |||
returns
|
|
The color distance. |
Remarks:
The alpha channel is ignored in the distance computation.
See also:
Distance_HSV_HSVComputes the distance between the given colors.
[Pure]
|
||||
public
static
method
|
Distance_RGB_RGB
(int64 colorA,
int64 colorB)
|
|||
type
|
float64
|
|||
params
|
colorA
|
First color. | ||
colorB
|
Second color. | |||
returns
|
|
The color distance. |
Remarks:
The alpha channel is ignored in the distance computation.
See also:
Distance_HSV_HSVReturns a distinct color that can be used for color-coding.
[Pure]
|
||||
public
static
method
|
Distinct
(int32 index)
|
|||
type
|
int64
|
|||
params
|
index
|
[>=0]
|
The color index. | |
returns
|
The distinct color. |
Encodes the given 64-bit A16R16G16B16 linear sRGB color value.
[Pure]
|
||||
public
static
method
|
Encode_A16R16G16B16
(int64 color,
bool srgb = true)
|
|||
type
|
int64
|
|||
params
|
color
|
The color value to encode. | ||
srgb
|
Return
a
compressed
sRGB
color
value
(true )
or
a
linear
color
value
(false )?
Defaults
to
true .
|
|||
returns
|
The 64-bit A16R16G16B16 linear resp. compressed sRGB color value. |
Encodes the given 64-bit A16R16G16B16 linear sRGB color value.
[Pure]
|
||||
public
static
method
|
Encode_A1R5G5B5
(int64 color,
bool srgb = true)
|
|||
type
|
int32
|
|||
params
|
color
|
The color value to encode. | ||
srgb
|
Return
a
compressed
sRGB
color
value
(true )
or
a
linear
color
value
(false )?
Defaults
to
true .
|
|||
returns
|
The 16-bit A1R5G5B5 linear resp. compressed sRGB color value. |
Encodes the given 64-bit A16R16G16B16 linear sRGB color value.
[Pure]
|
||||
public
static
method
|
Encode_A4R4G4B4
(int64 color,
bool srgb = true)
|
|||
type
|
int32
|
|||
params
|
color
|
The color value to encode. | ||
srgb
|
Return
a
compressed
sRGB
color
value
(true )
or
a
linear
color
value
(false )?
Defaults
to
true .
|
|||
returns
|
The 16-bit A4R4G4B4 linear resp. compressed sRGB color value. |
Encodes the given 64-bit A16R16G16B16 linear sRGB color value.
[Pure]
|
||||
public
static
method
|
Encode_A8R8G8B8
(int64 color,
bool srgb = true)
|
|||
type
|
int32
|
|||
params
|
color
|
The color value to encode. | ||
srgb
|
Return
a
compressed
sRGB
color
value
(true )
or
a
linear
color
value
(false )?
Defaults
to
true .
|
|||
returns
|
The 32-bit A8R8G8B8 linear resp. compressed sRGB color value. |
Encodes the given 64-bit A16R16G16B16 linear sRGB color value.
[Pure]
|
||||
public
static
method
|
Encode_B8G8R8
(int64 color,
bool srgb = true)
|
|||
type
|
int32
|
|||
params
|
color
|
The color value to encode. | ||
srgb
|
Return
a
compressed
sRGB
color
value
(true )
or
a
linear
color
value
(false )?
Defaults
to
true .
|
|||
returns
|
The 24-bit B8G8R8 linear resp. compressed sRGB color value. |
Encodes the given 64-bit A16R16G16B16 linear sRGB color value.
[Pure]
|
||||
public
static
method
|
Encode_R5G6B5
(int64 color,
bool srgb = true)
|
|||
type
|
int32
|
|||
params
|
color
|
The color value to encode. | ||
srgb
|
Return
a
compressed
sRGB
color
value
(true )
or
a
linear
color
value
(false )?
Defaults
to
true .
|
|||
returns
|
The 16-bit R5G6B5 linear resp. compressed sRGB color value. |
Encodes the given 64-bit A16R16G16B16 linear sRGB color value.
[Pure]
|
||||
public
static
method
|
Encode_R8G8B8
(int64 color,
bool srgb = true)
|
|||
type
|
int32
|
|||
params
|
color
|
The color value to encode. | ||
srgb
|
Return
a
compressed
sRGB
color
value
(true )
or
a
linear
color
value
(false )?
Defaults
to
true .
|
|||
returns
|
The 24-bit R8G8B8 linear resp. compressed sRGB color value. |
Converts a color value from HSV to RGB.
[Pure]
|
||||
public
static
method
|
FromHSV
(int64 color)
|
|||
type
|
int64
|
|||
params
|
color
|
The HSV color value. | ||
returns
|
The RGB color value. |
Remarks:
The mapping from RGB colors to HSV colors is bijective: Colors can be translated between RGB and HSV using the ToHSV, FromHSV and FromHSV methods without loss in precision (the alpha channel is dropped):
FromHSV(ToHSV(rgb)) = rgbWhen the saturation and/or brightness is zero, the hue value will become zero. Because of this, the HSV color value can be different for equal RGB color values:
ToHSV(FromHSV(hsv)) != hsvThe HSV color value is a 64-bit integer:
[0..65535]
,
[0..65535]
and
[0..393216]
with
393216
=
6
*
65536
=
360°.
See also:
ToHSVConverts a color value from HSV to RGB.
[Pure]
|
||||
public
static
method
|
FromHSV
(int32 hue,
int32 saturation,
int32 brightness)
|
|||
type
|
int64
|
|||
params
|
hue
|
Hue value in range [0..393216], where 393216 = 6 * 65536 = 360°. | ||
saturation
|
Saturation value in range [0..65535]. | |||
brightness
|
Brightness value in range [0..65535]. | |||
returns
|
The RGB color value. |
Remarks:
The mapping from RGB colors to HSV colors is bijective: Colors can be translated between RGB and HSV using the ToHSV, FromHSV and FromHSV methods without loss in precision (the alpha channel is dropped):
FromHSV(ToHSV(rgb)) = rgbWhen the saturation and/or brightness is zero, the hue value will become zero. Because of this, the HSV color value can be different for equal RGB color values:
ToHSV(FromHSV(hsv)) != hsv
See also:
ToHSVConverts a color value from HSV to RGB.
[Pure]
|
||||
public
static
method
|
FromHSVF
(float32 hue,
float32 saturation,
float32 brightness)
|
|||
type
|
int64
|
|||
params
|
hue
|
Hue value in range [0..360], in degrees. | ||
saturation
|
Saturation value in range [0..1]. | |||
brightness
|
Brightness value in range [0..1]. | |||
returns
|
The RGB color value. |
See also:
ToHSVCreates a color value based on the given color channel values.
[Pure]
|
||||
public
static
method
|
FromRGB16
(int32 red,
int32 green,
int32 blue,
int32 alpha = 65535)
|
|||
type
|
int64
|
|||
params
|
red
|
Red channel value (linear sRGB), in range [0..65535]. | ||
green
|
Green channel value (linear sRGB), in range [0..65535]. | |||
blue
|
Blue channel value (linear sRGB), in range [0..65535]. | |||
alpha
|
Alpha
channel
value
(linear),
in
range
[0..65535].
Defaults
to
65535 .
|
|||
returns
|
The color value. |
Creates a color value based on the given color channel values.
[Pure]
|
||||
public
static
method
|
FromRGB8
(int32 red,
int32 green,
int32 blue,
int32 alpha = 255)
|
|||
type
|
int64
|
|||
params
|
red
|
Red channel value (compressed sRGB), in range [0..255]. | ||
green
|
Green channel value (compressed sRGB), in range [0..255]. | |||
blue
|
Blue channel value (compressed sRGB), in range [0..255]. | |||
alpha
|
Alpha
channel
value
(linear),
in
range
[0..255].
Defaults
to
255 .
|
|||
returns
|
The color value. |
Creates a color based on the given color channel values.
[Pure]
|
||||
public
static
method
|
FromRGBF
(float32 red,
float32 green,
float32 blue,
float32 alpha = 1)
|
|||
type
|
int64
|
|||
params
|
red
|
Red channel value (linear sRGB), in range [0..1]. | ||
green
|
Green channel value (linear sRGB), in range [0..1]. | |||
blue
|
Blue channel value (linear sRGB), in range [0..1]. | |||
alpha
|
Alpha
channel
value
(linear),
in
range
[0..1].
Defaults
to
1 .
|
|||
returns
|
The color value. |
Converts the given color value to grayscale.
[Pure]
|
||||
public
static
method
|
GrayscaleF
(int64 color)
|
|||
type
|
float32
|
|||
params
|
color
|
The color value. | ||
returns
|
|
The grayscale value (linear sRGB). |
Remarks:
The grayscale value is a linear combination of the red, green and blue linear sRGB channel values using the following weights: 0.2126 / 0.7152 / 0.0722.
Converts the given color value to grayscale.
[Pure]
|
||||
public
static
method
|
GrayscaleI
(int64 color)
|
|||
type
|
int32
|
|||
params
|
color
|
The color value. | ||
returns
|
|
The grayscale value (linear sRGB). |
Remarks:
The grayscale value is a linear combination of the red, green and blue linear sRGB channel values, using the following weights: 0.2126 / 0.7152 / 0.0722.
Converts the given color value to grayscale.
[Pure]
|
||||
public
static
method
|
GrayscaleI8
(int64 color)
|
|||
type
|
int32
|
|||
params
|
color
|
The color value. | ||
returns
|
|
The grayscale value (compressed sRGB). |
Remarks:
The grayscale value is a linear combination of the red, green and blue linear sRGB channel values, using the following weights: 0.2126 / 0.7152 / 0.0722.
Returns the green channel of the given color value.
[Pure]
|
||||
public
static
method
|
GreenF
(int64 color)
|
|||
type
|
float32
|
|||
params
|
color
|
The color value. | ||
returns
|
|
The channel value (linear sRGB). |
Returns the green channel of the given color value.
[Pure]
|
||||
public
static
method
|
GreenI
(int64 color)
|
|||
type
|
int32
|
|||
params
|
color
|
The color value. | ||
returns
|
|
The channel value (linear sRGB). |
Returns the green channel of the given color value.
[Pure]
|
||||
public
static
method
|
GreenI8
(int64 color)
|
|||
type
|
int32
|
|||
params
|
color
|
The color value. | ||
returns
|
|
The channel value (compressed sRGB). |
Mixes
the
given
color
values
using
a
factor
of
0.5
.
[Pure]
|
||||
public
static
method
|
Mix
(int64 a,
int64 b)
|
|||
type
|
int64
|
|||
params
|
a
|
First color value. | ||
b
|
Second color value. | |||
returns
|
The resulting color value. |
Blends the given colors using the specified blend factor.
[Pure]
|
||||
public
static
method
|
Mix
(int64 a,
int64 b,
int32 factor)
|
|||
type
|
int64
|
|||
params
|
a
|
First
color
to
blend
(mapped
to
factor
0 ). |
||
b
|
Second
color
to
blend
(mapped
to
factor
65535 ). |
|||
factor
|
The
blend
factor
in
the
range
[0..65535] . |
|||
returns
|
The resulting color. |
Blends the given colors using the specified blend factor.
[Pure]
|
||||
public
static
method
|
Mix
(int64 a,
int64 b,
float64 factor)
|
|||
type
|
int64
|
|||
params
|
a
|
First
color
to
blend
(mapped
to
factor
0 ). |
||
b
|
Second
color
to
blend
(mapped
to
factor
1 ). |
|||
factor
|
The
blend
factor
in
the
range
[0..1] . |
|||
returns
|
The resulting color. |
Mixes
the
given
color
values
using
a
factor
of
0.25
.
[Pure]
|
||||
public
static
method
|
Mix
(int64 a,
int64 b,
int64 c,
int64 d)
|
|||
type
|
int64
|
|||
params
|
a
|
First color value. | ||
b
|
Second color value. | |||
c
|
Second color value. | |||
d
|
Second color value. | |||
returns
|
The resulting color value. |
Multiplies
the
given
color
value
with
the
specified
scalar.(a
*
b
).
[Pure]
|
||||
public
static
method
|
Mul
(int64 a,
float64 b)
|
|||
type
|
int64
|
|||
params
|
a
|
The color value. | ||
b
|
The scalar value. | |||
returns
|
The resulting color value. |
Multiplies the given color values (see Mul).
[Pure]
|
||||
public
static
method
|
Mul
(int64 a,
int64 b)
|
|||
type
|
int64
|
|||
params
|
a
|
First color value. | ||
b
|
Second color value. | |||
returns
|
The resulting color value. |
Returns the red channel of the given color value.
[Pure]
|
||||
public
static
method
|
RedF
(int64 color)
|
|||
type
|
float32
|
|||
params
|
color
|
The color value. | ||
returns
|
|
The channel value (linear sRGB). |
Returns the red channel of the given color value.
[Pure]
|
||||
public
static
method
|
RedI
(int64 color)
|
|||
type
|
int32
|
|||
params
|
color
|
The color value. | ||
returns
|
|
The channel value (linear sRGB). |
Returns the red channel of the given color value.
[Pure]
|
||||
public
static
method
|
RedI8
(int64 color)
|
|||
type
|
int32
|
|||
params
|
color
|
The color value. | ||
returns
|
|
The channel value (compressed sRGB). |
Subtracts the given color values (see Sub).
[Pure]
|
||||
public
static
method
|
Sub
(int64 a,
int64 b)
|
|||
type
|
int64
|
|||
params
|
a
|
First color value. | ||
b
|
Second color value. | |||
returns
|
The resulting color value. |
Converts the given color value into a tuple of three 32-bit floating-point values representing the red (see X), green (see Y) and blue (see Z).
[Pure]
|
||||
public
static
method
|
To3F
(int64 color)
|
|||
type
|
Vec3F
|
|||
params
|
color
|
The color value. | ||
returns
|
The 32-bit floating-point color vector (linear sRGB). |
Converts the given color value into a tuple of four 32-bit floating-point values representing the red (see X), green (see Y), blue (see Z) and alpha (see W) channels.
[Pure]
|
||||
public
static
method
|
To4F
(int64 color)
|
|||
type
|
Vec4F
|
|||
params
|
color
|
The color value. | ||
returns
|
The 32-bit floating-point color vector (linear sRGB). |
Converts this color value from RGB to HSV.
[Pure]
|
||||
public
static
method
|
ToHSV
(int64 color)
|
|||
type
|
int64
|
|||
params
|
color
|
The RGB color value. | ||
returns
|
The HSV color value. |
Remarks:
The mapping from RGB colors to HSV colors is bijective: Colors can be translated between RGB and HSV using the ToHSV, FromHSV and FromHSV methods without loss in precision (the alpha channel is dropped):
FromHSV(ToHSV(rgb)) = rgbWhen the saturation and/or brightness is zero, the hue value will become zero. Because of this, the HSV color value can be different for equal RGB color values:
ToHSV(FromHSV(hsv)) != hsvThe HSV color value is returned as a 64-bit integer:
[0..65535]
,
[0..65535]
and
[0..393216]
with
393216
=
6
*
65536
=
360°.
See also:
FromHSV