TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

class Colors in Tinman.Core.Util

The Colors class provides operations on 64-bit A16R16G16B16 linear sRGB color values.

static class Colors  

Remarks

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.

Configuration

Config

The configurator object for this type.

public static property Config { get }
type IConfigurator<int64>
value [not-null] The configurator object.

ConfigColorName

The configurator object for the color name enumeration.

public static property ConfigColorName { get }
type IConfigurator<int64>
value [not-null] The configurator object.

ConfigColorOp

The configurator object for ColorOp.

public static property ConfigColorOp { get }
type IConfigurator<ColorOp>
value [not-null] The configurator object.

Public / Constants

AliceBlue

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.

AntiqueWhite

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.

Aqua

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.

Aquamarine

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.

Azure

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.

Beige

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.

Bisque

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.

Black

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.

BlanchedAlmond

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.

Blue

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.

BlueViolet

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.

Brown

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.

BurlyWood

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.

CadetBlue

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.

Chartreuse

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.

Chocolate

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.

Coral

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.

CornflowerBlue

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.

Cornsilk

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.

Crimson

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.

Cyan

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.

DarkBlue

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.

DarkCyan

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.

DarkGoldenrod

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.

DarkGray

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.

DarkGreen

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.

DarkKhaki

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.

DarkMagenta

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.

DarkOliveGreen

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.

DarkOrange

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.

DarkOrchid

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.

DarkRed

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.

DarkSalmon

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.

DarkSeaGreen

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.

DarkSlateBlue

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.

DarkSlateGray

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.

DarkTurquoise

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.

DarkViolet

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.

DeepPink

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.

DeepSkyBlue

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.

DimGray

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.

DodgerBlue

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.

Firebrick

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.

FloralWhite

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.

ForestGreen

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.

Gainsboro

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.

GhostWhite

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.

Gold

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.

Goldenrod

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.

Gray

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.

Green

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.

GreenYellow

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.

Honeydew

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.

HotPink

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.

IndianRed

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.

Indigo

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.

Ivory

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.

Khaki

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.

Lavender

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.

LavenderBlush

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.

LawnGreen

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.

LemonChiffon

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.

LightBlue

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.

LightCoral

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.

LightCyan

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.

LightGoldenrodYellow

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.

LightGray

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.

LightGreen

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.

LightPink

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.

LightSalmon

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.

LightSeaGreen

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.

LightSkyBlue

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.

LightSlateGray

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.

LightSteelBlue

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.

LightYellow

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.

Lime

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.

LimeGreen

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.

Linen

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.

Magenta

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.

Maroon

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.

MediumAquamarine

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.

MediumBlue

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.

MediumOrchid

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.

MediumPurple

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.

MediumSeaGreen

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.

MediumSlateBlue

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.

MediumSpringGreen

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.

MediumTurquoise

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.

MediumVioletRed

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.

MidnightBlue

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.

MintCream

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.

MistyRose

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.

Moccasin

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.

NavajoWhite

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.

Navy

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.

OldLace

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.

Olive

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.

OliveDrab

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.

Opaque0

The color 'Opaque0' (HTML #FFFFFF, Alpha 0%).

public constant Opaque0 = 0xFFFFFFFF
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%.

Opaque05

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%.

Opaque10

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%.

Opaque15

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%.

Opaque20

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%.

Opaque25

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%.

Opaque30

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%.

Opaque35

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%.

Opaque40

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%.

Opaque45

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%.

Opaque50

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%.

Opaque55

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%.

Opaque60

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%.

Opaque65

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%.

Opaque70

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%.

Opaque75

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%.

Opaque80

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%.

Opaque85

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%.

Opaque90

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%.

Opaque95

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%.

Orange

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.

OrangeRed

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.

Orchid

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.

PaleGoldenrod

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.

PaleGreen

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.

PaleTurquoise

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.

PaleVioletRed

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.

PapayaWhip

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.

PeachPuff

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.

Peru

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.

Pink

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.

Plum

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.

PowderBlue

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.

Purple

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.

Red

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.

RosyBrown

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.

RoyalBlue

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.

SaddleBrown

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.

Salmon

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.

SandyBrown

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.

SeaGreen

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.

SeaShell

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.

Sienna

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.

Silver

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.

SkyBlue

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.

SlateBlue

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.

SlateGray

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.

Snow

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.

SoylentGreen

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.

SpringGreen

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.

SteelBlue

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.

Tan

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.

Teal

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.

Thistle

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.

Tomato

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.

Turquoise

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.

Violet

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.

Wheat

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.

White

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.

WhiteSmoke

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.

Yellow

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.

YellowGreen

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.

Zero

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.

Public / Methods

Add

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.

Adjust

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.

Alpha

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.

AlphaF

Returns the alpha channel of the given color value.

[Pure]
public static method AlphaF (int64 color)
type float32
params color The color value.
returns [0..1] The floating point channel value.

AlphaI

Returns the alpha channel of the given color value.

[Pure]
public static method AlphaI (int64 color)
type int32
params color The color value.
returns [0..65535] The channel value.

AlphaI8

Returns the alpha channel of the given color value.

[Pure]
public static method AlphaI8 (int64 color)
type int32
params color The color value.
returns [0..255] The channel value.

Blend

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.

BlueF

Returns the blue channel of the given color value.

[Pure]
public static method BlueF (int64 color)
type float32
params color The color value.
returns [0..1] The channel value (linear sRGB).

BlueI

Returns the blue channel of the given color value.

[Pure]
public static method BlueI (int64 color)
type int32
params color The color value.
returns [0..65535] The channel value (linear sRGB).

BlueI8

Returns the blue channel of the given color value.

[Pure]
public static method BlueI8 (int64 color)
type int32
params color The color value.
returns [0..255] The channel value (compressed sRGB).

Decode_A16B16G16R16

Decodes the given 64-bit A16B16G16R16 linear resp. compressed sRGB color value.

[Pure]
public static method Decode_A16B16G16R16 (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.

Remarks:

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.

[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.

Remarks:

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.

[Pure]
public static method Decode_A1B5G5R5 (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.

Remarks:

MSB  16       8       0  LSB
      |       |       |
      |A      |       |
      | BBBBB |       |
      |      GGGGG    |
      |       |   RRRRR

Decode_A1R5G5B5

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.

Remarks:

MSB  16       8       0  LSB
      |       |       |
      |A      |       |
      | RRRRR |       |
      |      GGGGG    |
      |       |   BBBBB

Decode_A2B10G10R10

Decodes the given 32-bit A2B10G10R10 linear resp. compressed sRGB color value.

[Pure]
public static method Decode_A2B10G10R10 (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.

Remarks:

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.

[Pure]
public static method Decode_A2R10G10B10 (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.

Remarks:

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.

[Pure]
public static method Decode_A4B4G4R4 (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.

Remarks:

MSB  16       8       0  LSB
      |       |       |
      |AAAA   |       |
      |    BBBB       |
      |       |GGGG   |
      |       |    RRRR

Decode_A4R4G4B4

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.

Remarks:

MSB  16       8       0  LSB
      |       |       |
      |AAAA   |       |
      |    RRRR       |
      |       |GGGG   |
      |       |    BBBB

Decode_A8B8G8R8

Decodes the given 32-bit A8B8G8R8 linear resp. compressed sRGB color value.

[Pure]
public static method Decode_A8B8G8R8 (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.

Remarks:

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.

[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.

Remarks:

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.

[Pure]
public static method Decode_B5G6R5 (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.

Remarks:

MSB  16       8       0  LSB
      |       |       |
      |BBBBB  |       |
      |     GGGGGG    |
      |       |   RRRRR

Decode_B8G8R8

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.

Remarks:

MSB  24      16       8       0  LSB
      |       |       |       |
      |BBBBBBBB       |       |
      |       |GGGGGGGG       |
      |       |       |RRRRRRRR

Decode_R5G6B5

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.

Remarks:

MSB  16       8       0  LSB
      |       |       |
      |RRRRR  |       |
      |     GGGGGG    |
      |       |   BBBBB

Decode_R8G8B8

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.

Remarks:

MSB  24      16       8       0  LSB
      |       |       |       |
      |RRRRRRRR       |       |
      |       |GGGGGGGG       |
      |       |       |BBBBBBBB

Distance_HSV_HSV

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 [0..1] The color distance.

Remarks:

The color distance is defined as the maximum of these terms:

The alpha channel is ignored in the distance computation.

Distance_HSV_RGB

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 [0..1] The color distance.

Remarks:

The alpha channel is ignored in the distance computation.

See also:

Distance_HSV_HSV

Distance_RGB_RGB

Computes 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 [0..1] The color distance.

Remarks:

The alpha channel is ignored in the distance computation.

See also:

Distance_HSV_HSV

Distinct

Returns 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.

Encode_A16B16G16R16

Encodes the given 64-bit A16R16G16B16 linear sRGB color value.

[Pure]
public static method Encode_A16B16G16R16 (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 A16B16G16R16 linear resp. compressed sRGB color value.

Remarks:

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.

[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.

Remarks:

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.

[Pure]
public static method Encode_A1B5G5R5 (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 A1B5G5R5 linear resp. compressed sRGB color value.

Remarks:

MSB  16       8       0  LSB
      |       |       |
      |A      |       |
      | BBBBB |       |
      |      GGGGG    |
      |       |   RRRRR

Encode_A1R5G5B5

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.

Remarks:

MSB  16       8       0  LSB
      |       |       |
      |A      |       |
      | RRRRR |       |
      |      GGGGG    |
      |       |   BBBBB

Encode_A2B10G10R10

Encodes the given 64-bit A16R16G16B16 linear sRGB color value.

[Pure]
public static method Encode_A2B10G10R10 (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 A2B10G10R10 linear resp. compressed sRGB color value.

Remarks:

MSB  32      24      16       8       0  LSB
      |       |       |       |       |
      |AA     |       |       |       |
      |  BBBBBBBBBB   |       |       |
      |       |    GGGGGGGGGG |       |
      |       |       |      RRRRRRRRRR

Encode_A2R10G10B10

Encodes the given 64-bit A16R16G16B16 linear sRGB color value.

[Pure]
public static method Encode_A2R10G10B10 (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 A2R10G10B10 linear resp. compressed sRGB color value.

Remarks:

MSB  32      24      16       8       0  LSB
      |       |       |       |       |
      |AA     |       |       |       |
      |  RRRRRRRRRR   |       |       |
      |       |    GGGGGGGGGG |       |
      |       |       |      BBBBBBBBBB

Encode_A4B4G4R4

Encodes the given 64-bit A16R16G16B16 linear sRGB color value.

[Pure]
public static method Encode_A4B4G4R4 (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 A4B4G4R4 linear resp. compressed sRGB color value.

Remarks:

MSB  16       8       0  LSB
      |       |       |
      |AAAA   |       |
      |    BBBB       |
      |       |GGGG   |
      |       |    RRRR

Encode_A4R4G4B4

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.

Remarks:

MSB  16       8       0  LSB
      |       |       |
      |AAAA   |       |
      |    RRRR       |
      |       |GGGG   |
      |       |    BBBB

Encode_A8B8G8R8

Encodes the given 64-bit A16R16G16B16 linear sRGB color value.

[Pure]
public static method Encode_A8B8G8R8 (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 A8B8G8R8 linear resp. compressed sRGB color value.

Remarks:

MSB  32      24      16       8       0  LSB
      |       |       |       |       |
      |AAAAAAAA       |       |       |
      |       |BBBBBBBB       |       |
      |       |       |GGGGGGGG       |
      |       |       |       |RRRRRRRR

Encode_A8R8G8B8

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.

Remarks:

MSB  32      24      16       8       0  LSB
      |       |       |       |       |
      |AAAAAAAA       |       |       |
      |       |RRRRRRRR       |       |
      |       |       |GGGGGGGG       |
      |       |       |       |BBBBBBBB

Encode_B5G6R5

Encodes the given 64-bit A16R16G16B16 linear sRGB color value.

[Pure]
public static method Encode_B5G6R5 (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 B5G6R5 linear resp. compressed sRGB color value.

Remarks:

MSB  16       8       0  LSB
      |       |       |
      |BBBBB  |       |
      |     GGGGGG    |
      |       |   RRRRR

Encode_B8G8R8

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.

Remarks:

MSB  24      16       8       0  LSB
      |       |       |       |
      |BBBBBBBB       |       |
      |       |GGGGGGGG       |
      |       |       |RRRRRRRR

Encode_R5G6B5

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.

Remarks:

MSB  16       8       0  LSB
      |       |       |
      |RRRRR  |       |
      |     GGGGGG    |
      |       |   BBBBB

Encode_R8G8B8

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.

Remarks:

MSB  24      16       8       0  LSB
      |       |       |       |
      |RRRRRRRR       |       |
      |       |GGGGGGGG       |
      |       |       |BBBBBBBB

FromHSV

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)) = 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:

ToHSV

Converts 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)) = 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:

ToHSV

FromHSVF

Converts 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:

ToHSV

FromRGB16

Creates 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.

FromRGB8

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.

FromRGBF

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.

GrayscaleF

Converts the given color value to grayscale.

[Pure]
public static method GrayscaleF (int64 color)
type float32
params color The color value.
returns [0..1] 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.

GrayscaleI

Converts the given color value to grayscale.

[Pure]
public static method GrayscaleI (int64 color)
type int32
params color The color value.
returns [0..65535] 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.

GrayscaleI8

Converts the given color value to grayscale.

[Pure]
public static method GrayscaleI8 (int64 color)
type int32
params color The color value.
returns [0..255] 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.

GreenF

Returns the green channel of the given color value.

[Pure]
public static method GreenF (int64 color)
type float32
params color The color value.
returns [0..1] The channel value (linear sRGB).

GreenI

Returns the green channel of the given color value.

[Pure]
public static method GreenI (int64 color)
type int32
params color The color value.
returns [0..65535] The channel value (linear sRGB).

GreenI8

Returns the green channel of the given color value.

[Pure]
public static method GreenI8 (int64 color)
type int32
params color The color value.
returns [0..255] The channel value (compressed sRGB).

IsTransparent

Is the given color fully transparent, i.e. it has an alpha value of zero?

public static method IsTransparent (int64 color)
type bool
params color The color value.
returns true if color is fully transparent,
false if color is partially transparent or opaque.

Mix

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.

Mul

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.

Opaque

Sets the alpha value of the given color to fully opaque.

public static method Opaque (int64 color)
type int64
params color The color value.
returns The fully opaque color value.

RedF

Returns the red channel of the given color value.

[Pure]
public static method RedF (int64 color)
type float32
params color The color value.
returns [0..1] The channel value (linear sRGB).

RedI

Returns the red channel of the given color value.

[Pure]
public static method RedI (int64 color)
type int32
params color The color value.
returns [0..65535] The channel value (linear sRGB).

RedI8

Returns the red channel of the given color value.

[Pure]
public static method RedI8 (int64 color)
type int32
params color The color value.
returns [0..255] The channel value (compressed sRGB).

Sub

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.

To3F

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).

To4F

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).

ToHSV

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)) = 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:

FromHSV
FromHSV