Colors

Description

static class Tinman.Core.Util.Colors

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

Alice​Blue


public constant AliceBlue → (-36206837628929:int64)

The color 'AliceBlue' (HTML #F0F8FF).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Antique​White


public constant AntiqueWhite → (-12391707464202:int64)

The color 'AntiqueWhite' (HTML #FAEBD7).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Aqua


public constant Aqua → (-281470681743361:int64)

The color 'Aqua' (HTML #00FFFF).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Aquamarine


public constant Aquamarine → (-221731981645685:int64)

The color 'Aquamarine' (HTML #7FFFD4).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Azure


public constant Azure → (-36206574305281:int64)

The color 'Azure' (HTML #F0FFFF).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Beige


public constant Beige → (-24460211996873:int64)

The color 'Beige' (HTML #F5F5DC).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Bisque


public constant Bisque → (-962818736:int64)

The color 'Bisque' (HTML #FFE4C4).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Black


public constant Black → (-281474976710656:int64)

The color 'Black' (HTML #000000).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Blanched​Almond


public constant BlanchedAlmond → (-726819767:int64)

The color 'BlanchedAlmond' (HTML #FFEBCD).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Blue


public constant Blue → (-281474976645121:int64)

The color 'Blue' (HTML #0000FF).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Blue​Violet


public constant BlueViolet → (-209937897635151:int64)

The color 'BlueViolet' (HTML #8A2BE2).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Brown


public constant Brown → (-175569573706259:int64)

The color 'Brown' (HTML #A52A2A).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Burly​Wood


public constant BurlyWood → (-75868538651130:int64)

The color 'BurlyWood' (HTML #DEB887).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Cadet​Blue


public constant CadetBlue → (-249261253502466:int64)

The color 'CadetBlue' (HTML #5F9EA0).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Chartreuse


public constant Chartreuse → (-221731981688832:int64)

The color 'Chartreuse' (HTML #7FFF00).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Chocolate


public constant Chocolate → (-100072131263661:int64)

The color 'Chocolate' (HTML #D2691E).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Coral


public constant Coral → (-3383421815:int64)

The color 'Coral' (HTML #FF7F50).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Cornflower​Blue


public constant CornflowerBlue → (-245602119001908:int64)

The color 'CornflowerBlue' (HTML #6495ED).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Cornsilk


public constant Cornsilk → (-263342281:int64)

The color 'Cornsilk' (HTML #FFF8DC).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Crimson


public constant Crimson → (-80028095607919:int64)

The color 'Crimson' (HTML #DC143C).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Cyan


public constant Cyan → (-281470681743361:int64)

The color 'Cyan' (HTML #00FFFF).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Dark​Blue


public constant DarkBlue → (-281474976693736:int64)

The color 'DarkBlue' (HTML #00008B).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Dark​Cyan


public constant DarkCyan → (-281473867824616:int64)

The color 'DarkCyan' (HTML #008B8B).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Dark​Goldenrod


public constant DarkGoldenrod → (-146560440139557:int64)

The color 'DarkGoldenrod' (HTML #B8860B).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Dark​Gray


public constant DarkGray → (-169799828019823:int64)

The color 'DarkGray' (HTML #A9A9A9).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Dark​Green


public constant DarkGreen → (-281474429353984:int64)

The color 'DarkGreen' (HTML #006400).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Dark​Khaki


public constant DarkKhaki → (-138235783600733:int64)

The color 'DarkKhaki' (HTML #BDB76B).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Dark​Magenta


public constant DarkMagenta → (-208804130045416:int64)

The color 'DarkMagenta' (HTML #8B008B).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Dark​Olive​Green


public constant DarkOliveGreen → (-255906404956345:int64)

The color 'DarkOliveGreen' (HTML #556B2F).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Dark​Orange


public constant DarkOrange → (-3168600064:int64)

The color 'DarkOrange' (HTML #FF8C00).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Dark​Orchid


public constant DarkOrchid → (-191813102429548:int64)

The color 'DarkOrchid' (HTML #9932CC).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Dark​Red


public constant DarkRed → (-208804130062336:int64)

The color 'DarkRed' (HTML #8B0000).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Dark​Salmon


public constant DarkSalmon → (-52118118256174:int64)

The color 'DarkSalmon' (HTML #E9967A).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Dark​Sea​Green


public constant DarkSeaGreen → (-204159110528488:int64)

The color 'DarkSeaGreen' (HTML #8FBC8B).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Dark​Slate​Blue


public constant DarkSlateBlue → (-263234050178536:int64)

The color 'DarkSlateBlue' (HTML #483D8B).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Dark​Slate​Gray


public constant DarkSlateGray → (-273473116826620:int64)

The color 'DarkSlateGray' (HTML #2F4F4F).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Dark​Turquoise


public constant DarkTurquoise → (-281472325803207:int64)

The color 'DarkTurquoise' (HTML #00CED1).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Dark​Violet


public constant DarkViolet → (-198122546354494:int64)

The color 'DarkViolet' (HTML #9400D3).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Deep​Pink


public constant DeepPink → (-4264932687:int64)

The color 'DeepPink' (HTML #FF1493).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Deep​Sky​Blue


public constant DeepSkyBlue → (-281472739049473:int64)

The color 'DeepSkyBlue' (HTML #00BFFF).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Dim​Gray


public constant DimGray → (-241711562742742:int64)

The color 'DimGray' (HTML #696969).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Dodger​Blue


public constant DodgerBlue → (-277818761674753:int64)

The color 'DodgerBlue' (HTML #1E90FF).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Firebrick


public constant Firebrick → (-156164942199784:int64)

The color 'Firebrick' (HTML #B22222).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Floral​White


public constant FloralWhite → (-189079791:int64)

The color 'FloralWhite' (HTML #FFFAF0).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Forest​Green


public constant ForestGreen → (-276972742114280:int64)

The color 'ForestGreen' (HTML #228B22).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Gainsboro


public constant Gainsboro → (-80025051744457:int64)

The color 'Gainsboro' (HTML #DCDCDC).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Ghost​White


public constant GhostWhite → (-17257441918977:int64)

The color 'GhostWhite' (HTML #F8F8FF).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Gold


public constant Gold → (-1376387072:int64)

The color 'Gold' (HTML #FFD700).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Goldenrod


public constant Goldenrod → (-84132498373709:int64)

The color 'Goldenrod' (HTML #DAA520).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Gray


public constant Gray → (-220717442255038:int64)

The color 'Gray' (HTML #808080).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Green


public constant Green → (-281474049638400:int64)

The color 'Green' (HTML #008000).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Green​Yellow


public constant GreenYellow → (-163848707438777:int64)

The color 'GreenYellow' (HTML #ADFF2F).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Honeydew


public constant Honeydew → (-36206574313711:int64)

The color 'Honeydew' (HTML #F0FFF0).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Hot​Pink


public constant HotPink → (-3688205097:int64)

The color 'HotPink' (HTML #FF69B4).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Indian​Red


public constant IndianRed → (-109637170488474:int64)

The color 'IndianRed' (HTML #CD5C5C).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Indigo


public constant Indigo → (-261670882494171:int64)

The color 'Indigo' (HTML #4B0082).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Ivory


public constant Ivory → (-8431:int64)

The color 'Ivory' (HTML #FFFFF0).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Khaki


public constant Khaki → (-36207470689501:int64)

The color 'Khaki' (HTML #F0E68C).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Lavender


public constant Lavender → (-58743164046150:int64)

The color 'Lavender' (HTML #E6E6FA).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Lavender​Blush


public constant LavenderBlush → (-552474176:int64)

The color 'LavenderBlush' (HTML #FFF0F5).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Lawn​Green


public constant LawnGreen → (-224738572828672:int64)

The color 'LawnGreen' (HTML #7CFC00).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Lemon​Chiffon


public constant LemonChiffon → (-189096887:int64)

The color 'LemonChiffon' (HTML #FFFACD).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Light​Blue


public constant LightBlue → (-163850053039470:int64)

The color 'LightBlue' (HTML #ADD8E6).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Light​Coral


public constant LightCoral → (-36209942186174:int64)

The color 'LightCoral' (HTML #F08080).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Light​Cyan


public constant LightCyan → (-71661529333761:int64)

The color 'LightCyan' (HTML #E0FFFF).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Light​Goldenrod​Yellow


public constant LightGoldenrodYellow → (-12391169743620:int64)

The color 'LightGoldenrodYellow' (HTML #FAFAD2).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Light​Gray


public constant LightGray → (-98120025069886:int64)

The color 'LightGray' (HTML #D3D3D3).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Light​Green


public constant LightGreen → (-202972187310235:int64)

The color 'LightGreen' (HTML #90EE90).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Light​Pink


public constant LightPink → (-2285860732:int64)

The color 'LightPink' (HTML #FFB6C1).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Light​Salmon


public constant LightSalmon → (-2785136174:int64)

The color 'LightSalmon' (HTML #FFA07A).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Light​Sea​Green


public constant LightSeaGreen → (-277405730576664:int64)

The color 'LightSeaGreen' (HTML #20B2AA).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Light​Sky​Blue


public constant LightSkyBlue → (-213276835056454:int64)

The color 'LightSkyBlue' (HTML #87CEFA).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Light​Slate​Gray


public constant LightSlateGray → (-229547764657780:int64)

The color 'LightSlateGray' (HTML #778899).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Light​Steel​Blue


public constant LightSteelBlue → (-159272196326657:int64)

The color 'LightSteelBlue' (HTML #B0C4DE).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Light​Yellow


public constant LightYellow → (-16686:int64)

The color 'LightYellow' (HTML #FFFFE0).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Lime


public constant Lime → (-281470681808896:int64)

The color 'Lime' (HTML #00FF00).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Lime​Green


public constant LimeGreen → (-272495873030102:int64)

The color 'LimeGreen' (HTML #32CD32).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Linen


public constant Linen → (-12391533131118:int64)

The color 'Linen' (HTML #FAF0E6).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Magenta


public constant Magenta → (-4294901761:int64)

The color 'Magenta' (HTML #FF00FF).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Maroon


public constant Maroon → (-220718369341440:int64)

The color 'Maroon' (HTML #800000).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Medium​Aquamarine


public constant MediumAquamarine → (-244071779440920:int64)

The color 'MediumAquamarine' (HTML #66CDAA).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Medium​Blue


public constant MediumBlue → (-281474976670647:int64)

The color 'MediumBlue' (HTML #0000CD).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Medium​Orchid


public constant MediumOrchid → (-143266833914174:int64)

The color 'MediumOrchid' (HTML #BA55D3).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Medium​Purple


public constant MediumPurple → (-199350211070633:int64)

The color 'MediumPurple' (HTML #9370DB).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Medium​Sea​Green


public constant MediumSeaGreen → (-268755642471866:int64)

The color 'MediumSeaGreen' (HTML #3CB371).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Medium​Slate​Blue


public constant MediumSlateBlue → (-225725706609952:int64)

The color 'MediumSlateBlue' (HTML #7B68EE).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Medium​Spring​Green


public constant MediumSpringGreen → (-281470870859079:int64)

The color 'MediumSpringGreen' (HTML #00FA9A).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Medium​Turquoise


public constant MediumTurquoise → (-263231512143212:int64)

The color 'MediumTurquoise' (HTML #48D1CC).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Medium​Violet​Red


public constant MediumVioletRed → (-120718613595125:int64)

The color 'MediumVioletRed' (HTML #C71585).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Midnight​Blue


public constant MidnightBlue → (-278739040786053:int64)

The color 'MidnightBlue' (HTML #191970).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Mint​Cream


public constant MintCream → (-24459838753606:int64)

The color 'MintCream' (HTML #F5FFFA).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Misty​Rose


public constant MistyRose → (-962805568:int64)

The color 'MistyRose' (HTML #FFE4E1).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Moccasin


public constant Moccasin → (-962824630:int64)

The color 'Moccasin' (HTML #FFE4B5).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.


public constant NavajoWhite → (-1157666054:int64)

The color 'NavajoWhite' (HTML #FFDEAD).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.


public constant Navy → (-281474976696510:int64)

The color 'Navy' (HTML #000080).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Old​Lace


public constant OldLace → (-4995420206446:int64)

The color 'OldLace' (HTML #FDF5E6).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Olive


public constant Olive → (-220717442269184:int64)

The color 'Olive' (HTML #808000).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Olive​Drab


public constant OliveDrab → (-240091805055923:int64)

The color 'OliveDrab' (HTML #6B8E23).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Opaque0


public constant Opaque0 → (281474976710655:int64)

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


public constant Opaque05 → (940689372167012351:int64)

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


public constant Opaque10 → (1881097269357314047:int64)

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


public constant Opaque15 → (2749166097532977151:int64)

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


public constant Opaque20 → (3689573994723278847:int64)

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


public constant Opaque25 → (4629981891913580543:int64)

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


public constant Opaque30 → (5570389789103882239:int64)

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


public constant Opaque35 → (6438458617279545343:int64)

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


public constant Opaque40 → (7378866514469847039:int64)

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


public constant Opaque45 → (8319274411660148735:int64)

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


public constant Opaque50 → (-9187061764859101185:int64)

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


public constant Opaque55 → (-8318992936683438081:int64)

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


public constant Opaque60 → (-7378585039493136385:int64)

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


public constant Opaque65 → (-6438177142302834689:int64)

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


public constant Opaque70 → (-5497769245112532993:int64)

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


public constant Opaque75 → (-4629700416936869889:int64)

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


public constant Opaque80 → (-3689292519746568193:int64)

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


public constant Opaque85 → (-2748884622556266497:int64)

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


public constant Opaque90 → (-1808476725365964801:int64)

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


public constant Opaque95 → (-940407897190301697:int64)

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


public constant Orange → (-2678980608:int64)

The color 'Orange' (HTML #FFA500).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Orange​Red


public constant OrangeRed → (-4039376896:int64)

The color 'OrangeRed' (HTML #FF4500).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Orchid


public constant Orchid → (-84133418390491:int64)

The color 'Orchid' (HTML #DA70D6).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Pale​Goldenrod


public constant PaleGoldenrod → (-40815903349016:int64)

The color 'PaleGoldenrod' (HTML #EEE8AA).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Pale​Green


public constant PaleGreen → (-193093291388831:int64)

The color 'PaleGreen' (HTML #98FB98).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Pale​Turquoise


public constant PaleTurquoise → (-160808493327648:int64)

The color 'PaleTurquoise' (HTML #AFEEEE).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Pale​Violet​Red


public constant PaleVioletRed → (-82089013982543:int64)

The color 'PaleVioletRed' (HTML #DB7093).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Papaya​Whip


public constant PapayaWhip → (-587748778:int64)

The color 'PapayaWhip' (HTML #FFEFD5).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Peach​Puff


public constant PeachPuff → (-1283752910:int64)

The color 'PeachPuff' (HTML #FFDAB9).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Peru


public constant Peru → (-109636622807878:int64)

The color 'Peru' (HTML #CD853F).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Pink


public constant Pink → (-2031052574:int64)

The color 'Pink' (HTML #FFC0CB).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Plum


public constant Plum → (-77956441523943:int64)

The color 'Plum' (HTML #DDA0DD).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Powder​Blue


public constant PowderBlue → (-159271365719406:int64)

The color 'PowderBlue' (HTML #B0E0E6).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Purple


public constant Purple → (-220718369327294:int64)

The color 'Purple' (HTML #800080).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Red


public constant Red → (-4294967296:int64)

The color 'Red' (HTML #FF0000).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Rosy​Brown


public constant RosyBrown → (-139924559804847:int64)

The color 'RosyBrown' (HTML #BC8F8F).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Royal​Blue


public constant RoyalBlue → (-266596603215680:int64)

The color 'RoyalBlue' (HTML #4169E1).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Saddle​Brown


public constant SaddleBrown → (-208803874471509:int64)

The color 'SaddleBrown' (HTML #8B4513).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Salmon


public constant Salmon → (-12394348532972:int64)

The color 'Salmon' (HTML #FA8072).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Sandy​Brown


public constant SandyBrown → (-26837656199694:int64)

The color 'SandyBrown' (HTML #F4A460).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Sea​Green


public constant SeaGreen → (-273785876375450:int64)

The color 'SeaGreen' (HTML #2E8B57).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Sea​Shell


public constant SeaShell → (-373237024:int64)

The color 'SeaShell' (HTML #FFF5EE).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Sienna


public constant Sienna → (-182527157729608:int64)

The color 'Sienna' (HTML #A0522D).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Silver


public constant Silver → (-133107362527504:int64)

The color 'Silver' (HTML #C0C0C0).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Sky​Blue


public constant SkyBlue → (-213276835064659:int64)

The color 'SkyBlue' (HTML #87CEEB).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Slate​Blue


public constant SlateBlue → (-240908571468727:int64)

The color 'SlateBlue' (HTML #6A5ACD).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Slate​Gray


public constant SlateGray → (-235865791903899:int64)

The color 'SlateGray' (HTML #708090).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Snow


public constant Snow → (-189074246:int64)

The color 'Snow' (HTML #FFFAFA).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Soylent​Green


public constant SoylentGreen → (-216525190460984:int64)

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.

Spring​Green


public constant SpringGreen → (-281470681794987:int64)

The color 'SpringGreen' (HTML #00FF7F).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Steel​Blue


public constant SteelBlue → (-264234019228457:int64)

The color 'SteelBlue' (HTML #4682B4).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Tan


public constant Tan → (-100070777732317:int64)

The color 'Tan' (HTML #D2B48C).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Teal


public constant Teal → (-281474049624254:int64)

The color 'Teal' (HTML #008080).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Thistle


public constant Thistle → (-88190620815414:int64)

The color 'Thistle' (HTML #D8BFD8).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Tomato


public constant Tomato → (-3759075295:int64)

The color 'Tomato' (HTML #FF6347).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Turquoise


public constant Turquoise → (-267040685121159:int64)

The color 'Turquoise' (HTML #40E0D0).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Violet


public constant Violet → (-40818410399008:int64)

The color 'Violet' (HTML #EE82EE).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Wheat


public constant Wheat → (-24460996414618:int64)

The color 'Wheat' (HTML #F5DEB3).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

White


public constant White → (-1:int64)

The color 'White' (HTML #FFFFFF).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

White​Smoke


public constant WhiteSmoke → (-24460211983936:int64)

The color 'WhiteSmoke' (HTML #F5F5F5).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Yellow


public constant Yellow → (-65536:int64)

The color 'Yellow' (HTML #FFFF00).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Yellow​Green


public constant YellowGreen → (-190517832251350:int64)

The color 'YellowGreen' (HTML #9ACD32).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Zero


public constant Zero → (0:int64)

The color 'Zero' (HTML #000000, Alpha 0%).

The color is encoded as a 64-bit A16R16G16B16 linear sRGB color value.

Fully transparent black.

Public / Methods

Add


[Pure]
public static method Add → (2)

in : int64

First color value.

in : int64

Second color value.

returns → int64

The resulting color value.

Adds the given color values (see ColorOp.Add).

Adjust


[Pure]
public static method Adjust → (3)

color in : int64

The input color.

factorBrightness in : int32

The brightness adjustment factor in the range [-1000..1000].

factorSaturation opt : int32 = 0

The saturation adjustment factor in the range [-1000..1000].

returns → int64

The resulting color value.

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.

Alpha


[Pure]
public static method Alpha → (2)

alpha16 in : int32

The new alpha channel, in the range [0..65535].

color opt : int64 = Colors.White

The color.

returns → int64

The resulting color.

Replaces the alpha component of the given color.

Alpha​F


[Pure]
public static method AlphaF → (1)

color in : int64

The color value.

returns → float32

The floating point channel value.

Returns the alpha channel of the given color value.

Alpha​I


[Pure]
public static method AlphaI → (1)

color in : int64

The color value.

returns → int32

The channel value.

Returns the alpha channel of the given color value.

Alpha​I8


[Pure]
public static method AlphaI8 → (1)

color in : int64

The color value.

returns → int32

The channel value.

Returns the alpha channel of the given color value.

Blend


[Pure]
public static method Blend → (2)

in : int64

First color to blend.

in : int64

Second color to blend.

returns → int64

The resulting color.

Blends the given colors (in over in, see ColorOp.Blend).

Blue​F


[Pure]
public static method BlueF → (1)

color in : int64

The color value.

returns → float32

The channel value (linear sRGB).

Returns the blue channel of the given color value.

Blue​I


[Pure]
public static method BlueI → (1)

color in : int64

The color value.

returns → int32

The channel value (linear sRGB).

Returns the blue channel of the given color value.

Blue​I8


[Pure]
public static method BlueI8 → (1)

color in : int64

The color value.

returns → int32

The channel value (compressed sRGB).

Returns the blue channel of the given color value.

Decode_​A16​B16​G16​R16


[Pure]
public static method Decode_A16B16G16R16 → (2)

color in : int64

The color value to decode.

srgb opt : bool = true

Is color in sRGB compressed (true) or sRGB linear (false)?

returns → int64

The 64-bit A16R16G16B16 linear sRGB color value.

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_​A16​R16​G16​B16


[Pure]
public static method Decode_A16R16G16B16 → (2)

color in : int64

The color value to decode.

srgb opt : bool = true

Is color in sRGB compressed (true) or sRGB linear (false)?

returns → int64

The 64-bit A16R16G16B16 linear sRGB color value.

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_​A1​B5​G5​R5


[Pure]
public static method Decode_A1B5G5R5 → (2)

color in : int32

The color value to decode.

srgb opt : bool = true

Is color in sRGB compressed (true) or sRGB linear (false)?

returns → int64

The 64-bit A16R16G16B16 linear sRGB color value.

Decodes the given 16-bit A1B5G5R5 linear resp. compressed sRGB color value.

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

Decode_​A1​R5​G5​B5


[Pure]
public static method Decode_A1R5G5B5 → (2)

color in : int32

The color value to decode.

srgb opt : bool = true

Is color in sRGB compressed (true) or sRGB linear (false)?

returns → int64

The 64-bit A16R16G16B16 linear sRGB color value.

Decodes the given 16-bit A1R5G5B5 linear resp. compressed sRGB color value.

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

Decode_​A2​B10​G10​R10


[Pure]
public static method Decode_A2B10G10R10 → (2)

color in : int32

The color value to decode.

srgb opt : bool = true

Is color in sRGB compressed (true) or sRGB linear (false)?

returns → int64

The 64-bit A16R16G16B16 linear sRGB color value.

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

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

Decode_​A2​R10​G10​B10


[Pure]
public static method Decode_A2R10G10B10 → (2)

color in : int32

The color value to decode.

srgb opt : bool = true

Is color in sRGB compressed (true) or sRGB linear (false)?

returns → int64

The 64-bit A16R16G16B16 linear sRGB color value.

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

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

Decode_​A4​B4​G4​R4


[Pure]
public static method Decode_A4B4G4R4 → (2)

color in : int32

The color value to decode.

srgb opt : bool = true

Is color in sRGB compressed (true) or sRGB linear (false)?

returns → int64

The 64-bit A16R16G16B16 linear sRGB color value.

Decodes the given 16-bit A4B4G4R4 linear resp. compressed sRGB color value.

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

Decode_​A4​R4​G4​B4


[Pure]
public static method Decode_A4R4G4B4 → (2)

color in : int32

The color value to decode.

srgb opt : bool = true

Is color in sRGB compressed (true) or sRGB linear (false)?

returns → int64

The 64-bit A16R16G16B16 linear sRGB color value.

Decodes the given 16-bit A4R4G4B4 linear resp. compressed sRGB color value.

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

Decode_​A8​B8​G8​R8


[Pure]
public static method Decode_A8B8G8R8 → (2)

color in : int32

The color value to decode.

srgb opt : bool = true

Is color in sRGB compressed (true) or sRGB linear (false)?

returns → int64

The 64-bit A16R16G16B16 linear sRGB color value.

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

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

Decode_​A8​R8​G8​B8


[Pure]
public static method Decode_A8R8G8B8 → (2)

color in : int32

The color value to decode.

srgb opt : bool = true

Is color in sRGB compressed (true) or sRGB linear (false)?

returns → int64

The 64-bit A16R16G16B16 linear sRGB color value.

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

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

Decode_​B5​G6​R5


[Pure]
public static method Decode_B5G6R5 → (2)

color in : int32

The color value to decode.

srgb opt : bool = true

Is color in sRGB compressed (true) or sRGB linear (false)?

returns → int64

The 64-bit A16R16G16B16 linear sRGB color value.

Decodes the given 16-bit B5G6R5 linear resp. compressed sRGB color value.

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

Decode_​B8​G8​R8


[Pure]
public static method Decode_B8G8R8 → (2)

color in : int32

The color value to decode.

srgb opt : bool = true

Is color in sRGB compressed (true) or sRGB linear (false)?

returns → int64

The 64-bit A16R16G16B16 linear sRGB color value.

Decodes the given 24-bit B8G8R8 linear resp. compressed sRGB color value.

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

Decode_​R5​G6​B5


[Pure]
public static method Decode_R5G6B5 → (2)

color in : int32

The color value to decode.

srgb opt : bool = true

Is color in sRGB compressed (true) or sRGB linear (false)?

returns → int64

The 64-bit A16R16G16B16 linear sRGB color value.

Decodes the given 16-bit R5G6B5 linear resp. compressed sRGB color value.

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

Decode_​R8​G8​B8


[Pure]
public static method Decode_R8G8B8 → (2)

color in : int32

The color value to decode.

srgb opt : bool = true

Is color in sRGB compressed (true) or sRGB linear (false)?

returns → int64

The 64-bit A16R16G16B16 linear sRGB color value.

Decodes the given 24-bit R8G8B8 linear resp. compressed sRGB color value.

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

Distance_​HSV_​HSV


[Pure]
public static method Distance_HSV_HSV → (2)

hsvA in : int64

First color, in HSV space (see ToHSV).

hsvB in : int64

Second color, in HSV space (see ToHSV).

returns → float64

The color distance.

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 and Pb on the chroma disc:

                    90°
                 _.------.
             ,-''         `--.
           ,'     Pb          `.
          /        \            \
         ;          \            :
    180° |           O-----------Pa 0°
         :                       ;
          \                     /
           `.                 ,'
             '--.         _.-'
                 `------''
                   270°

    The color hue defines the direction of the vector pointing from O to P*. The length of the vector is given by the product of color brightness and saturation, both in normalized range [0..1].

The alpha channel is ignored in the distance computation.

Distance_​HSV_​RGB


[Pure]
public static method Distance_HSV_RGB → (2)

hsvA in : int64

First color, in HSV space (see ToHSV).

colorB in : int64

Second color.

returns → float64

The color distance.

Computes the distance between the given colors.

The alpha channel is ignored in the distance computation.

Distance_​RGB_​RGB


[Pure]
public static method Distance_RGB_RGB → (2)

colorA in : int64

First color.

colorB in : int64

Second color.

returns → float64

The color distance.

Computes the distance between the given colors.

The alpha channel is ignored in the distance computation.

Distinct


[Pure]
public static method Distinct → (1)

index in : int32

[>=0]
The color index.

returns → int64

The distinct color.

Returns a distinct color that can be used for color-coding.

Encode_​A16​B16​G16​R16


[Pure]
public static method Encode_A16B16G16R16 → (2)

color in : int64

The color value to encode.

srgb opt : bool = true

Return a compressed sRGB color value (true) or a linear color value (false)?

returns → int64

The 64-bit A16B16G16R16 linear resp. compressed sRGB color value.

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_​A16​R16​G16​B16


[Pure]
public static method Encode_A16R16G16B16 → (2)

color in : int64

The color value to encode.

srgb opt : bool = true

Return a compressed sRGB color value (true) or a linear color value (false)?

returns → int64

The 64-bit A16R16G16B16 linear resp. compressed sRGB color value.

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_​A1​B5​G5​R5


[Pure]
public static method Encode_A1B5G5R5 → (2)

color in : int64

The color value to encode.

srgb opt : bool = true

Return a compressed sRGB color value (true) or a linear color value (false)?

returns → int32

The 16-bit A1B5G5R5 linear resp. compressed sRGB color value.

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

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

Encode_​A1​R5​G5​B5


[Pure]
public static method Encode_A1R5G5B5 → (2)

color in : int64

The color value to encode.

srgb opt : bool = true

Return a compressed sRGB color value (true) or a linear color value (false)?

returns → int32

The 16-bit A1R5G5B5 linear resp. compressed sRGB color value.

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

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

Encode_​A2​B10​G10​R10


[Pure]
public static method Encode_A2B10G10R10 → (2)

color in : int64

The color value to encode.

srgb opt : bool = true

Return a compressed sRGB color value (true) or a linear color value (false)?

returns → int32

The 32-bit A2B10G10R10 linear resp. compressed sRGB color value.

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

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

Encode_​A2​R10​G10​B10


[Pure]
public static method Encode_A2R10G10B10 → (2)

color in : int64

The color value to encode.

srgb opt : bool = true

Return a compressed sRGB color value (true) or a linear color value (false)?

returns → int32

The 32-bit A2R10G10B10 linear resp. compressed sRGB color value.

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

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

Encode_​A4​B4​G4​R4


[Pure]
public static method Encode_A4B4G4R4 → (2)

color in : int64

The color value to encode.

srgb opt : bool = true

Return a compressed sRGB color value (true) or a linear color value (false)?

returns → int32

The 16-bit A4B4G4R4 linear resp. compressed sRGB color value.

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

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

Encode_​A4​R4​G4​B4


[Pure]
public static method Encode_A4R4G4B4 → (2)

color in : int64

The color value to encode.

srgb opt : bool = true

Return a compressed sRGB color value (true) or a linear color value (false)?

returns → int32

The 16-bit A4R4G4B4 linear resp. compressed sRGB color value.

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

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

Encode_​A8​B8​G8​R8


[Pure]
public static method Encode_A8B8G8R8 → (2)

color in : int64

The color value to encode.

srgb opt : bool = true

Return a compressed sRGB color value (true) or a linear color value (false)?

returns → int32

The 32-bit A8B8G8R8 linear resp. compressed sRGB color value.

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

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

Encode_​A8​R8​G8​B8


[Pure]
public static method Encode_A8R8G8B8 → (2)

color in : int64

The color value to encode.

srgb opt : bool = true

Return a compressed sRGB color value (true) or a linear color value (false)?

returns → int32

The 32-bit A8R8G8B8 linear resp. compressed sRGB color value.

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

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

Encode_​B5​G6​R5


[Pure]
public static method Encode_B5G6R5 → (2)

color in : int64

The color value to encode.

srgb opt : bool = true

Return a compressed sRGB color value (true) or a linear color value (false)?

returns → int32

The 16-bit B5G6R5 linear resp. compressed sRGB color value.

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

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

Encode_​B8​G8​R8


[Pure]
public static method Encode_B8G8R8 → (2)

color in : int64

The color value to encode.

srgb opt : bool = true

Return a compressed sRGB color value (true) or a linear color value (false)?

returns → int32

The 24-bit B8G8R8 linear resp. compressed sRGB color value.

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

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

Encode_​R5​G6​B5


[Pure]
public static method Encode_R5G6B5 → (2)

color in : int64

The color value to encode.

srgb opt : bool = true

Return a compressed sRGB color value (true) or a linear color value (false)?

returns → int32

The 16-bit R5G6B5 linear resp. compressed sRGB color value.

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

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

Encode_​R8​G8​B8


[Pure]
public static method Encode_R8G8B8 → (2)

color in : int64

The color value to encode.

srgb opt : bool = true

Return a compressed sRGB color value (true) or a linear color value (false)?

returns → int32

The 24-bit R8G8B8 linear resp. compressed sRGB color value.

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

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

From​HSV

2 overloads


[Pure]
public static method FromHSV1 → (1)

color in : int64

The HSV color value.

returns → int64

The RGB color value.

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

Colors.ToHSV


[Pure]
public static method FromHSV2 → (3)

hue in : int32

Hue value in range [0..393216], where 393216 = 6 * 65536 = 360°.

saturation in : int32

Saturation value in range [0..65535].

brightness in : int32

Brightness value in range [0..65535].

returns → int64

The RGB color value.

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

Colors.ToHSV

From​HSVF


[Pure]
public static method FromHSVF → (3)

hue in : float32

Hue value in range [0..360], in degrees.

saturation in : float32

Saturation value in range [0..1].

brightness in : float32

Brightness value in range [0..1].

returns → int64

The RGB color value.

Converts a color value from HSV to RGB.

See also

Colors.ToHSV

From​RGB16


[Pure]
public static method FromRGB16 → (4)

red in : int32

Red channel value (linear sRGB), in range [0..65535].

green in : int32

Green channel value (linear sRGB), in range [0..65535].

blue in : int32

Blue channel value (linear sRGB), in range [0..65535].

alpha opt : int32 = 65535

Alpha channel value (linear), in range [0..65535].

returns → int64

The color value.

Creates a color value based on the given color channel values.

From​RGB8


[Pure]
public static method FromRGB8 → (4)

red in : int32

Red channel value (compressed sRGB), in range [0..255].

green in : int32

Green channel value (compressed sRGB), in range [0..255].

blue in : int32

Blue channel value (compressed sRGB), in range [0..255].

alpha opt : int32 = 255

Alpha channel value (linear), in range [0..255].

returns → int64

The color value.

Creates a color value based on the given color channel values.

From​RGBF


[Pure]
public static method FromRGBF → (4)

red in : float32

Red channel value (linear sRGB), in range [0..1].

green in : float32

Green channel value (linear sRGB), in range [0..1].

blue in : float32

Blue channel value (linear sRGB), in range [0..1].

alpha opt : float32 = 1

Alpha channel value (linear), in range [0..1].

returns → int64

The color value.

Creates a color based on the given color channel values.

Grayscale​F


[Pure]
public static method GrayscaleF → (1)

color in : int64

The color value.

returns → float32

The grayscale value (linear sRGB).

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.

Grayscale​I


[Pure]
public static method GrayscaleI → (1)

color in : int64

The color value.

returns → int32

The grayscale value (linear sRGB).

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.

Grayscale​I8


[Pure]
public static method GrayscaleI8 → (1)

color in : int64

The color value.

returns → int32

The grayscale value (compressed sRGB).

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.

Green​F


[Pure]
public static method GreenF → (1)

color in : int64

The color value.

returns → float32

The channel value (linear sRGB).

Returns the green channel of the given color value.

Green​I


[Pure]
public static method GreenI → (1)

color in : int64

The color value.

returns → int32

The channel value (linear sRGB).

Returns the green channel of the given color value.

Green​I8


[Pure]
public static method GreenI8 → (1)

color in : int64

The color value.

returns → int32

The channel value (compressed sRGB).

Returns the green channel of the given color value.

Is​Transparent


[Pure]
public static method IsTransparent → (1)

color in : int64

The color value.

returns → bool

true if color in is fully transparent,
false if color in is partially transparent or opaque.

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

Mix

4 overloads


[Pure]
public static method Mix1 → (2)

in : int64

First color value.

in : int64

Second color value.

returns → int64

The resulting color value.

Mixes the given color values using a factor of 0.5.


[Pure]
public static method Mix2 → (4)

in : int64

First color value.

in : int64

Second color value.

in : int64

Second color value.

in : int64

Second color value.

returns → int64

The resulting color value.

Mixes the given color values using a factor of 0.25.


[Pure]
public static method Mix3 → (3)

in : int64

First color to blend (mapped to factor 0).

in : int64

Second color to blend (mapped to factor 65535).

factor in : int32

The blend factor in the range [0..65535].

returns → int64

The resulting color.

Blends the given colors using the specified blend factor.


[Pure]
public static method Mix4 → (3)

in : int64

First color to blend (mapped to factor 0).

in : int64

Second color to blend (mapped to factor 1).

factor in : float64

The blend factor in the range [0..1].

returns → int64

The resulting color.

Blends the given colors using the specified blend factor.

Mul

2 overloads


[Pure]
public static method Mul1 → (2)

in : int64

The color value.

in : float64

The scalar value.

returns → int64

The resulting color value.

Multiplies the given color value with the specified scalar.(a * b).


[Pure]
public static method Mul2 → (2)

in : int64

First color value.

in : int64

Second color value.

returns → int64

The resulting color value.

Multiplies the given color values (see ColorOp.Mul).

Opaque


[Pure]
public static method Opaque → (1)

color in : int64

The color value.

returns → int64

The fully opaque color value.

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

Red​F


[Pure]
public static method RedF → (1)

color in : int64

The color value.

returns → float32

The channel value (linear sRGB).

Returns the red channel of the given color value.

Red​I


[Pure]
public static method RedI → (1)

color in : int64

The color value.

returns → int32

The channel value (linear sRGB).

Returns the red channel of the given color value.

Red​I8


[Pure]
public static method RedI8 → (1)

color in : int64

The color value.

returns → int32

The channel value (compressed sRGB).

Returns the red channel of the given color value.

Sub


[Pure]
public static method Sub → (2)

in : int64

First color value.

in : int64

Second color value.

returns → int64

The resulting color value.

Subtracts the given color values (see ColorOp.Sub).

To3​F


[Pure]
public static method To3F → (1)

color in : int64

The color value.

returns → Vec3F

The 32-bit floating-point color vector (linear sRGB).

Converts the given color value into a tuple of three 32-bit floating-point values representing the red (see Vec4F.X), green (see Vec4F.Y) and blue (see Vec4F.Z).

To4​F


[Pure]
public static method To4F → (1)

color in : int64

The color value.

returns → Vec4F

The 32-bit floating-point color vector (linear sRGB).

Converts the given color value into a tuple of four 32-bit floating-point values representing the red (see Vec4F.X), green (see Vec4F.Y), blue (see Vec4F.Z) and alpha (see Vec4F.W) channels.

To​HSV


[Pure]
public static method ToHSV → (1)

color in : int64

The RGB color value.

returns → int64

The HSV color value.

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

Configuration

Config


public static attribute Config → (get)

value : IConfigurator<int64>

[not-null]
The configurator object.

The configurator object for this type.

Config​Color​Name


public static attribute ConfigColorName → (get)

value : IConfigurator<int64>

[not-null]
The configurator object.

The configurator object for the color name enumeration.

Config​Color​Op


public static attribute ConfigColorOp → (get)

value : IConfigurator<ColorOp>

[not-null]
The configurator object.

The configurator object for ColorOp.