Colors
Description
The Colors class provides operations on 64-bit A16R16G16B16 linear sRGB color values.
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.
Public / Constants
AliceBlue
The color 'AliceBlue' (HTML #F0F8FF).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
AntiqueWhite
The color 'AntiqueWhite' (HTML #FAEBD7).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Aqua
The color 'Aqua' (HTML #00FFFF).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Aquamarine
The color 'Aquamarine' (HTML #7FFFD4).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Azure
The color 'Azure' (HTML #F0FFFF).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Beige
The color 'Beige' (HTML #F5F5DC).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Bisque
The color 'Bisque' (HTML #FFE4C4).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Black
The color 'Black' (HTML #000000).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
BlanchedAlmond
The color 'BlanchedAlmond' (HTML #FFEBCD).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Blue
The color 'Blue' (HTML #0000FF).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
BlueViolet
The color 'BlueViolet' (HTML #8A2BE2).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Brown
The color 'Brown' (HTML #A52A2A).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
BurlyWood
The color 'BurlyWood' (HTML #DEB887).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
CadetBlue
The color 'CadetBlue' (HTML #5F9EA0).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Chartreuse
The color 'Chartreuse' (HTML #7FFF00).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Chocolate
The color 'Chocolate' (HTML #D2691E).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Coral
The color 'Coral' (HTML #FF7F50).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
CornflowerBlue
The color 'CornflowerBlue' (HTML #6495ED).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Cornsilk
The color 'Cornsilk' (HTML #FFF8DC).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Crimson
The color 'Crimson' (HTML #DC143C).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Cyan
The color 'Cyan' (HTML #00FFFF).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
DarkBlue
The color 'DarkBlue' (HTML #00008B).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
DarkCyan
The color 'DarkCyan' (HTML #008B8B).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
DarkGoldenrod
The color 'DarkGoldenrod' (HTML #B8860B).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
DarkGray
The color 'DarkGray' (HTML #A9A9A9).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
DarkGreen
The color 'DarkGreen' (HTML #006400).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
DarkKhaki
The color 'DarkKhaki' (HTML #BDB76B).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
DarkMagenta
The color 'DarkMagenta' (HTML #8B008B).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
DarkOliveGreen
The color 'DarkOliveGreen' (HTML #556B2F).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
DarkOrange
The color 'DarkOrange' (HTML #FF8C00).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
DarkOrchid
The color 'DarkOrchid' (HTML #9932CC).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
DarkRed
The color 'DarkRed' (HTML #8B0000).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
DarkSalmon
The color 'DarkSalmon' (HTML #E9967A).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
DarkSeaGreen
The color 'DarkSeaGreen' (HTML #8FBC8B).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
DarkSlateBlue
The color 'DarkSlateBlue' (HTML #483D8B).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
DarkSlateGray
The color 'DarkSlateGray' (HTML #2F4F4F).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
DarkTurquoise
The color 'DarkTurquoise' (HTML #00CED1).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
DarkViolet
The color 'DarkViolet' (HTML #9400D3).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
DeepPink
The color 'DeepPink' (HTML #FF1493).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
DeepSkyBlue
The color 'DeepSkyBlue' (HTML #00BFFF).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
DimGray
The color 'DimGray' (HTML #696969).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
DodgerBlue
The color 'DodgerBlue' (HTML #1E90FF).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Firebrick
The color 'Firebrick' (HTML #B22222).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
FloralWhite
The color 'FloralWhite' (HTML #FFFAF0).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
ForestGreen
The color 'ForestGreen' (HTML #228B22).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Gainsboro
The color 'Gainsboro' (HTML #DCDCDC).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
GhostWhite
The color 'GhostWhite' (HTML #F8F8FF).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Gold
The color 'Gold' (HTML #FFD700).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Goldenrod
The color 'Goldenrod' (HTML #DAA520).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Gray
The color 'Gray' (HTML #808080).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Green
The color 'Green' (HTML #008000).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
GreenYellow
The color 'GreenYellow' (HTML #ADFF2F).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Honeydew
The color 'Honeydew' (HTML #F0FFF0).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
HotPink
The color 'HotPink' (HTML #FF69B4).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
IndianRed
The color 'IndianRed' (HTML #CD5C5C).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Indigo
The color 'Indigo' (HTML #4B0082).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Ivory
The color 'Ivory' (HTML #FFFFF0).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Khaki
The color 'Khaki' (HTML #F0E68C).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Lavender
The color 'Lavender' (HTML #E6E6FA).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
LavenderBlush
The color 'LavenderBlush' (HTML #FFF0F5).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
LawnGreen
The color 'LawnGreen' (HTML #7CFC00).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
LemonChiffon
The color 'LemonChiffon' (HTML #FFFACD).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
LightBlue
The color 'LightBlue' (HTML #ADD8E6).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
LightCoral
The color 'LightCoral' (HTML #F08080).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
LightCyan
The color 'LightCyan' (HTML #E0FFFF).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
LightGoldenrodYellow
The color 'LightGoldenrodYellow' (HTML #FAFAD2).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
LightGray
The color 'LightGray' (HTML #D3D3D3).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
LightGreen
The color 'LightGreen' (HTML #90EE90).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
LightPink
The color 'LightPink' (HTML #FFB6C1).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
LightSalmon
The color 'LightSalmon' (HTML #FFA07A).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
LightSeaGreen
The color 'LightSeaGreen' (HTML #20B2AA).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
LightSkyBlue
The color 'LightSkyBlue' (HTML #87CEFA).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
LightSlateGray
The color 'LightSlateGray' (HTML #778899).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
LightSteelBlue
The color 'LightSteelBlue' (HTML #B0C4DE).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
LightYellow
The color 'LightYellow' (HTML #FFFFE0).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Lime
The color 'Lime' (HTML #00FF00).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
LimeGreen
The color 'LimeGreen' (HTML #32CD32).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Linen
The color 'Linen' (HTML #FAF0E6).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Magenta
The color 'Magenta' (HTML #FF00FF).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Maroon
The color 'Maroon' (HTML #800000).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
MediumAquamarine
The color 'MediumAquamarine' (HTML #66CDAA).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
MediumBlue
The color 'MediumBlue' (HTML #0000CD).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
MediumOrchid
The color 'MediumOrchid' (HTML #BA55D3).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
MediumPurple
The color 'MediumPurple' (HTML #9370DB).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
MediumSeaGreen
The color 'MediumSeaGreen' (HTML #3CB371).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
MediumSlateBlue
The color 'MediumSlateBlue' (HTML #7B68EE).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
MediumSpringGreen
The color 'MediumSpringGreen' (HTML #00FA9A).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
MediumTurquoise
The color 'MediumTurquoise' (HTML #48D1CC).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
MediumVioletRed
The color 'MediumVioletRed' (HTML #C71585).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
MidnightBlue
The color 'MidnightBlue' (HTML #191970).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
MintCream
The color 'MintCream' (HTML #F5FFFA).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
MistyRose
The color 'MistyRose' (HTML #FFE4E1).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Moccasin
The color 'Moccasin' (HTML #FFE4B5).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
NavajoWhite
The color 'NavajoWhite' (HTML #FFDEAD).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Navy
The color 'Navy' (HTML #000080).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
OldLace
The color 'OldLace' (HTML #FDF5E6).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Olive
The color 'Olive' (HTML #808000).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
OliveDrab
The color 'OliveDrab' (HTML #6B8E23).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Opaque0
The color 'Opaque0' (HTML #FFFFFF, Alpha 0%).
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%.
Opaque05
The color 'Opaque05' (HTML #FFFFFF, Alpha 5%).
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%.
Opaque10
The color 'Opaque10' (HTML #FFFFFF, Alpha 10%).
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%.
Opaque15
The color 'Opaque15' (HTML #FFFFFF, Alpha 15%).
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%.
Opaque20
The color 'Opaque20' (HTML #FFFFFF, Alpha 20%).
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%.
Opaque25
The color 'Opaque25' (HTML #FFFFFF, Alpha 25%).
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%.
Opaque30
The color 'Opaque30' (HTML #FFFFFF, Alpha 30%).
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%.
Opaque35
The color 'Opaque35' (HTML #FFFFFF, Alpha 35%).
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%.
Opaque40
The color 'Opaque40' (HTML #FFFFFF, Alpha 40%).
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%.
Opaque45
The color 'Opaque45' (HTML #FFFFFF, Alpha 45%).
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%.
Opaque50
The color 'Opaque50' (HTML #FFFFFF, Alpha 50%).
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%.
Opaque55
The color 'Opaque55' (HTML #FFFFFF, Alpha 55%).
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%.
Opaque60
The color 'Opaque60' (HTML #FFFFFF, Alpha 60%).
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%.
Opaque65
The color 'Opaque65' (HTML #FFFFFF, Alpha 65%).
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%.
Opaque70
The color 'Opaque70' (HTML #FFFFFF, Alpha 70%).
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%.
Opaque75
The color 'Opaque75' (HTML #FFFFFF, Alpha 75%).
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%.
Opaque80
The color 'Opaque80' (HTML #FFFFFF, Alpha 80%).
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%.
Opaque85
The color 'Opaque85' (HTML #FFFFFF, Alpha 85%).
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%.
Opaque90
The color 'Opaque90' (HTML #FFFFFF, Alpha 90%).
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%.
Opaque95
The color 'Opaque95' (HTML #FFFFFF, Alpha 95%).
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%.
Orange
The color 'Orange' (HTML #FFA500).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
OrangeRed
The color 'OrangeRed' (HTML #FF4500).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Orchid
The color 'Orchid' (HTML #DA70D6).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
PaleGoldenrod
The color 'PaleGoldenrod' (HTML #EEE8AA).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
PaleGreen
The color 'PaleGreen' (HTML #98FB98).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
PaleTurquoise
The color 'PaleTurquoise' (HTML #AFEEEE).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
PaleVioletRed
The color 'PaleVioletRed' (HTML #DB7093).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
PapayaWhip
The color 'PapayaWhip' (HTML #FFEFD5).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
PeachPuff
The color 'PeachPuff' (HTML #FFDAB9).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Peru
The color 'Peru' (HTML #CD853F).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Pink
The color 'Pink' (HTML #FFC0CB).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Plum
The color 'Plum' (HTML #DDA0DD).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
PowderBlue
The color 'PowderBlue' (HTML #B0E0E6).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Purple
The color 'Purple' (HTML #800080).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Red
The color 'Red' (HTML #FF0000).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
RosyBrown
The color 'RosyBrown' (HTML #BC8F8F).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
RoyalBlue
The color 'RoyalBlue' (HTML #4169E1).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
SaddleBrown
The color 'SaddleBrown' (HTML #8B4513).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Salmon
The color 'Salmon' (HTML #FA8072).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
SandyBrown
The color 'SandyBrown' (HTML #F4A460).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
SeaGreen
The color 'SeaGreen' (HTML #2E8B57).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
SeaShell
The color 'SeaShell' (HTML #FFF5EE).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Sienna
The color 'Sienna' (HTML #A0522D).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Silver
The color 'Silver' (HTML #C0C0C0).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
SkyBlue
The color 'SkyBlue' (HTML #87CEEB).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
SlateBlue
The color 'SlateBlue' (HTML #6A5ACD).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
SlateGray
The color 'SlateGray' (HTML #708090).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Snow
The color 'Snow' (HTML #FFFAFA).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
SoylentGreen
The color 'SoylentGreen' (HTML #849537).
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.
SpringGreen
The color 'SpringGreen' (HTML #00FF7F).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
SteelBlue
The color 'SteelBlue' (HTML #4682B4).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Tan
The color 'Tan' (HTML #D2B48C).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Teal
The color 'Teal' (HTML #008080).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Thistle
The color 'Thistle' (HTML #D8BFD8).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Tomato
The color 'Tomato' (HTML #FF6347).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Turquoise
The color 'Turquoise' (HTML #40E0D0).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Violet
The color 'Violet' (HTML #EE82EE).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Wheat
The color 'Wheat' (HTML #F5DEB3).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
White
The color 'White' (HTML #FFFFFF).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
WhiteSmoke
The color 'WhiteSmoke' (HTML #F5F5F5).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Yellow
The color 'Yellow' (HTML #FFFF00).
The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.
Public / Methods
Adjust
Adjusts saturation and brightness in HSV
color space.
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 in. Values in between are interpolated. The returned color value will have the same alpha channel value as the given input color in.
Decode_A16B16G16R16
Decodes the given 64-bit A16B16G16R16 linear resp. compressed sRGB color value.
MSB 64 56 48 40 32 24 16 8 0 LSB | | | | | | | | | |AAAAAAAAAAAAAAAA | | | | | | | | |BBBBBBBBBBBBBBBB | | | | | | | | |GGGGGGGGGGGGGGGG | | | | | | | | |RRRRRRRRRRRRRRRR
Decode_A16R16G16B16
Decodes the given 64-bit A16R16G16B16 linear resp. compressed sRGB color value.
MSB 64 56 48 40 32 24 16 8 0 LSB | | | | | | | | | |AAAAAAAAAAAAAAAA | | | | | | | | |RRRRRRRRRRRRRRRR | | | | | | | | |GGGGGGGGGGGGGGGG | | | | | | | | |BBBBBBBBBBBBBBBB
Decode_A1B5G5R5
Decodes the given 16-bit A1B5G5R5 linear resp. compressed sRGB color value.
MSB 16 8 0 LSB | | | |A | | | BBBBB | | | GGGGG | | | RRRRR
Decode_A1R5G5B5
Decodes the given 16-bit A1R5G5B5 linear resp. compressed sRGB color value.
MSB 16 8 0 LSB | | | |A | | | RRRRR | | | GGGGG | | | BBBBB
Decode_A2B10G10R10
Decodes the given 32-bit A2B10G10R10 linear resp. compressed sRGB color value.
MSB 32 24 16 8 0 LSB | | | | | |AA | | | | | BBBBBBBBBB | | | | GGGGGGGGGG | | | | RRRRRRRRRR
Decode_A2R10G10B10
Decodes the given 32-bit A2R10G10B10 linear resp. compressed sRGB color value.
MSB 32 24 16 8 0 LSB | | | | | |AA | | | | | RRRRRRRRRR | | | | GGGGGGGGGG | | | | BBBBBBBBBB
Decode_A4B4G4R4
Decodes the given 16-bit A4B4G4R4 linear resp. compressed sRGB color value.
MSB 16 8 0 LSB | | | |AAAA | | | BBBB | | |GGGG | | | RRRR
Decode_A4R4G4B4
Decodes the given 16-bit A4R4G4B4 linear resp. compressed sRGB color value.
MSB 16 8 0 LSB | | | |AAAA | | | RRRR | | |GGGG | | | BBBB
Decode_A8B8G8R8
Decodes the given 32-bit A8B8G8R8 linear resp. compressed sRGB color value.
MSB 32 24 16 8 0 LSB | | | | | |AAAAAAAA | | | | |BBBBBBBB | | | | |GGGGGGGG | | | | |RRRRRRRR
Decode_A8R8G8B8
Decodes the given 32-bit A8R8G8B8 linear resp. compressed sRGB color value.
MSB 32 24 16 8 0 LSB | | | | | |AAAAAAAA | | | | |RRRRRRRR | | | | |GGGGGGGG | | | | |BBBBBBBB
Decode_B5G6R5
Decodes the given 16-bit B5G6R5 linear resp. compressed sRGB color value.
MSB 16 8 0 LSB | | | |BBBBB | | | GGGGGG | | | RRRRR
Decode_B8G8R8
Decodes the given 24-bit B8G8R8 linear resp. compressed sRGB color value.
MSB 24 16 8 0 LSB | | | | |BBBBBBBB | | | |GGGGGGGG | | | |RRRRRRRR
Decode_R5G6B5
Decodes the given 16-bit R5G6B5 linear resp. compressed sRGB color value.
MSB 16 8 0 LSB | | | |RRRRR | | | GGGGGG | | | BBBBB
Decode_R8G8B8
Decodes the given 24-bit R8G8B8 linear resp. compressed sRGB color value.
MSB 24 16 8 0 LSB | | | | |RRRRRRRR | | | |GGGGGGGG | | | |BBBBBBBB
Distance_HSV_HSV
Computes the distance between the given colors.
The color distance is defined as the maximum of these terms:
-
Absolute difference between brightness values, in normalized range [0..1].
-
Absolute difference between saturation values, in normalized range [0..1].
-
Euclidean distance between color points
Pa
andPb
on the chroma disc:90° _.------. ,-'' `--. ,' Pb `. / \ \ ; \ : 180° | O-----------Pa 0° : ; \ / `. ,' '--. _.-' `------'' 270°
The color hue defines the direction of the vector pointing from
O
toP*
. The length of the vector is given by the product of color brightness and saturation, both in normalized range [0..1].
The alpha channel is ignored in the distance computation.
Distance_HSV_RGB
Computes the distance between the given colors.
The alpha channel is ignored in the distance computation.
- See also
Distance_RGB_RGB
Computes the distance between the given colors.
The alpha channel is ignored in the distance computation.
- See also
Encode_A16B16G16R16
Encodes the given 64-bit A16R16G16B16 linear sRGB color value.
MSB 64 56 48 40 32 24 16 8 0 LSB | | | | | | | | | |AAAAAAAAAAAAAAAA | | | | | | | | |BBBBBBBBBBBBBBBB | | | | | | | | |GGGGGGGGGGGGGGGG | | | | | | | | |RRRRRRRRRRRRRRRR
Encode_A16R16G16B16
Encodes the given 64-bit A16R16G16B16 linear sRGB color value.
MSB 64 56 48 40 32 24 16 8 0 LSB | | | | | | | | | |AAAAAAAAAAAAAAAA | | | | | | | | |RRRRRRRRRRRRRRRR | | | | | | | | |GGGGGGGGGGGGGGGG | | | | | | | | |BBBBBBBBBBBBBBBB
Encode_A1B5G5R5
Encodes the given 64-bit A16R16G16B16 linear sRGB color value.
MSB 16 8 0 LSB | | | |A | | | BBBBB | | | GGGGG | | | RRRRR
Encode_A1R5G5B5
Encodes the given 64-bit A16R16G16B16 linear sRGB color value.
MSB 16 8 0 LSB | | | |A | | | RRRRR | | | GGGGG | | | BBBBB
Encode_A2B10G10R10
Encodes the given 64-bit A16R16G16B16 linear sRGB color value.
MSB 32 24 16 8 0 LSB | | | | | |AA | | | | | BBBBBBBBBB | | | | | GGGGGGGGGG | | | | | RRRRRRRRRR
Encode_A2R10G10B10
Encodes the given 64-bit A16R16G16B16 linear sRGB color value.
MSB 32 24 16 8 0 LSB | | | | | |AA | | | | | RRRRRRRRRR | | | | | GGGGGGGGGG | | | | | BBBBBBBBBB
Encode_A4B4G4R4
Encodes the given 64-bit A16R16G16B16 linear sRGB color value.
MSB 16 8 0 LSB | | | |AAAA | | | BBBB | | |GGGG | | | RRRR
Encode_A4R4G4B4
Encodes the given 64-bit A16R16G16B16 linear sRGB color value.
MSB 16 8 0 LSB | | | |AAAA | | | RRRR | | |GGGG | | | BBBB
Encode_A8B8G8R8
Encodes the given 64-bit A16R16G16B16 linear sRGB color value.
MSB 32 24 16 8 0 LSB | | | | | |AAAAAAAA | | | | |BBBBBBBB | | | | |GGGGGGGG | | | | |RRRRRRRR
Encode_A8R8G8B8
Encodes the given 64-bit A16R16G16B16 linear sRGB color value.
MSB 32 24 16 8 0 LSB | | | | | |AAAAAAAA | | | | |RRRRRRRR | | | | |GGGGGGGG | | | | |BBBBBBBB
Encode_B5G6R5
Encodes the given 64-bit A16R16G16B16 linear sRGB color value.
MSB 16 8 0 LSB | | | |BBBBB | | | GGGGGG | | | RRRRR
Encode_B8G8R8
Encodes the given 64-bit A16R16G16B16 linear sRGB color value.
MSB 24 16 8 0 LSB | | | | |BBBBBBBB | | | |GGGGGGGG | | | |RRRRRRRR
Encode_R5G6B5
Encodes the given 64-bit A16R16G16B16 linear sRGB color value.
MSB 16 8 0 LSB | | | |RRRRR | | | GGGGGG | | | BBBBB
Encode_R8G8B8
Encodes the given 64-bit A16R16G16B16 linear sRGB color value.
MSB 24 16 8 0 LSB | | | | |RRRRRRRR | | | |GGGGGGGG | | | |BBBBBBBB
FromHSV
2 overloads
Converts a color value from HSV to RGB.
The mapping from RGB colors to HSV colors is bijective: Colors can be translated between RGB and HSV using the ToHSV, FromHSV1 and FromHSV2 methods without loss in precision (the alpha channel is dropped):
FromHSV(ToHSV(rgb)) = rgb
When 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
The HSV color value is a 64-bit integer:
Bits 0-15 represent the brightness value in the range [0..65535]
,
Bits 16-31 represent the saturation value in the range [0..65535]
and
Bits 32-50 represent the hue value in the range [0..393216]
with 393216 = 6 * 65536 = 360°.
- See also
Converts a color value from HSV to RGB.
The mapping from RGB colors to HSV colors is bijective: Colors can be translated between RGB and HSV using the ToHSV, FromHSV1 and FromHSV2 methods without loss in precision (the alpha channel is dropped):
FromHSV(ToHSV(rgb)) = rgb
When 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
GrayscaleF
Converts the given color value to grayscale.
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.
GrayscaleI
Converts the given color value to grayscale.
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.
GrayscaleI8
Converts the given color value to grayscale.
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.
Mix
4 overloads
Mixes the given color values using a factor of 0.5
.
Mixes the given color values using a factor of 0.25
.
Blends the given colors using the specified blend factor.
Blends the given colors using the specified blend factor.
Mul
2 overloads
Multiplies the given color value with the specified scalar.(a * b
).
Multiplies the given color values (see ColorOp.Mul).
ToHSV
Converts this color value from RGB to HSV.
The mapping from RGB colors to HSV colors is bijective: Colors can be translated between RGB and HSV using the ToHSV, FromHSV1 and FromHSV2 methods without loss in precision (the alpha channel is dropped):
FromHSV(ToHSV(rgb)) = rgb
When 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
The HSV color value is returned as a 64-bit integer:
Bits 0-15 represent the brightness value in the range [0..65535]
,
Bits 16-31 represent the saturation value in the range [0..65535]
and
Bits 32-50 represent the hue value in the range [0..393216]
with 393216 = 6 * 65536 = 360°.
- See also