Colors

object Colors

Just a lot of colors to use when drawing :)

The constants are all the CSS colors, taken from https://www.w3schools.com/colors/colors_names.asp

Author

Rafael Lins - g0dkar

See also

Functions

Link copied to clipboard
fun allColors(): Map<String, Int>

Just a convenience for developers to go through all colors and see which is nicer :)

Link copied to clipboard
fun css(str: String): Int

Very simple function to turn "#cc0000" into a color.

Link copied to clipboard
fun getRGBA(color: Int): List<Int>

Compute the R, G, B and Alpha components of a color. All values between 0..255.

Link copied to clipboard
fun rgba(r: Int, g: Int, b: Int, a: Int = 255): Int

Builds an RGBA color value from its numerical components. All values must be between 0..255.

Link copied to clipboard
fun withAlpha(color: Int, alpha: Int): Int

Returns the especified color with an added alpha channel. That means a transparent/opaque color.

Properties

Link copied to clipboard
const val ALICE_BLUE: Int = 15792383
Link copied to clipboard
const val ANTIQUE_WHITE: Int = 16444375
Link copied to clipboard
const val AQUA: Int = 65535
Link copied to clipboard
const val AQUAMARINE: Int = 8388564
Link copied to clipboard
const val AZURE: Int = 15794175
Link copied to clipboard
const val BEIGE: Int = 16119260
Link copied to clipboard
const val BISQUE: Int = 16770244
Link copied to clipboard
const val BLACK: Int = 0
Link copied to clipboard
const val BLANCHED_ALMOND: Int = 16772045
Link copied to clipboard
const val BLUE: Int = 255
Link copied to clipboard
const val BLUE_VIOLET: Int = 9055202
Link copied to clipboard
const val BROWN: Int = 10824234
Link copied to clipboard
const val BURLY_WOOD: Int = 14596231
Link copied to clipboard
const val CADET_BLUE: Int = 6266528
Link copied to clipboard
const val CHARTREUSE: Int = 8388352
Link copied to clipboard
const val CHOCOLATE: Int = 13789470
Link copied to clipboard
const val CORAL: Int = 16744272
Link copied to clipboard
const val CORNFLOWER_BLUE: Int = 6591981
Link copied to clipboard
const val CORNSILK: Int = 16775388
Link copied to clipboard
const val CRIMSON: Int = 14423100
Link copied to clipboard
const val CYAN: Int = 65535
Link copied to clipboard
const val DARK_BLUE: Int = 139
Link copied to clipboard
const val DARK_CYAN: Int = 35723
Link copied to clipboard
const val DARK_GOLDEN_ROD: Int = 12092939
Link copied to clipboard
const val DARK_GRAY: Int = 11119017
Link copied to clipboard
const val DARK_GREEN: Int = 25600
Link copied to clipboard
const val DARK_GREY: Int = 11119017
Link copied to clipboard
const val DARK_KHAKI: Int = 12433259
Link copied to clipboard
const val DARK_MAGENTA: Int = 9109643
Link copied to clipboard
const val DARK_OLIVE_GREEN: Int = 5597999
Link copied to clipboard
const val DARK_ORANGE: Int = 16747520
Link copied to clipboard
const val DARK_ORCHID: Int = 10040012
Link copied to clipboard
const val DARK_RED: Int = 9109504
Link copied to clipboard
const val DARK_SALMON: Int = 15308410
Link copied to clipboard
const val DARK_SEA_GREEN: Int = 9419919
Link copied to clipboard
const val DARK_SLATE_BLUE: Int = 4734347
Link copied to clipboard
const val DARK_SLATE_GRAY: Int = 3100495
Link copied to clipboard
const val DARK_SLATE_GREY: Int = 3100495
Link copied to clipboard
const val DARK_TURQUOISE: Int = 52945
Link copied to clipboard
const val DARK_VIOLET: Int = 9699539
Link copied to clipboard
const val DEEP_PINK: Int = 16716947
Link copied to clipboard
const val DEEP_SKY_BLUE: Int = 49151
Link copied to clipboard
const val DIM_GRAY: Int = 6908265
Link copied to clipboard
const val DIM_GREY: Int = 6908265
Link copied to clipboard
const val DODGER_BLUE: Int = 2003199
Link copied to clipboard
const val FIRE_BRICK: Int = 11674146
Link copied to clipboard
const val FLORAL_WHITE: Int = 16775920
Link copied to clipboard
const val FOREST_GREEN: Int = 2263842
Link copied to clipboard
const val FUCHSIA: Int = 16711935
Link copied to clipboard
const val GAINSBORO: Int = 14474460
Link copied to clipboard
const val GHOST_WHITE: Int = 16316671
Link copied to clipboard
const val GOLD: Int = 16766720
Link copied to clipboard
const val GOLDEN_ROD: Int = 14329120
Link copied to clipboard
const val GRAY: Int = 8421504
Link copied to clipboard
const val GREEN: Int = 32768
Link copied to clipboard
const val GREEN_YELLOW: Int = 11403055
Link copied to clipboard
const val GREY: Int = 8421504
Link copied to clipboard
const val HONEY_DEW: Int = 15794160
Link copied to clipboard
const val HOT_PINK: Int = 16738740
Link copied to clipboard
const val INDIAN_RED: Int = 13458524
Link copied to clipboard
const val INDIGO: Int = 4915330
Link copied to clipboard
const val IVORY: Int = 16777200
Link copied to clipboard
const val KHAKI: Int = 15787660
Link copied to clipboard
const val LAVENDER: Int = 15132410
Link copied to clipboard
const val LAVENDER_BLUSH: Int = 16773365
Link copied to clipboard
const val LAWN_GREEN: Int = 8190976
Link copied to clipboard
const val LEMON_CHIFFON: Int = 16775885
Link copied to clipboard
const val LIGHT_BLUE: Int = 11393254
Link copied to clipboard
const val LIGHT_CORAL: Int = 15761536
Link copied to clipboard
const val LIGHT_CYAN: Int = 14745599
Link copied to clipboard
const val LIGHT_GOLDEN_ROD_YELLOW: Int = 16448210
Link copied to clipboard
const val LIGHT_GRAY: Int = 13882323
Link copied to clipboard
const val LIGHT_GREEN: Int = 9498256
Link copied to clipboard
const val LIGHT_GREY: Int = 13882323
Link copied to clipboard
const val LIGHT_PINK: Int = 16758465
Link copied to clipboard
const val LIGHT_SALMON: Int = 16752762
Link copied to clipboard
const val LIGHT_SEA_GREEN: Int = 2142890
Link copied to clipboard
const val LIGHT_SKY_BLUE: Int = 8900346
Link copied to clipboard
const val LIGHT_SLATE_GRAY: Int = 7833753
Link copied to clipboard
const val LIGHT_SLATE_GREY: Int = 7833753
Link copied to clipboard
const val LIGHT_STEEL_BLUE: Int = 11584734
Link copied to clipboard
const val LIGHT_YELLOW: Int = 16777184
Link copied to clipboard
const val LIME: Int = 65280
Link copied to clipboard
const val LIME_GREEN: Int = 3329330
Link copied to clipboard
const val LINEN: Int = 16445670
Link copied to clipboard
const val MAGENTA: Int = 16711935
Link copied to clipboard
const val MAROON: Int = 8388608
Link copied to clipboard
const val MEDIUM_AQUA_MARINE: Int = 6737322
Link copied to clipboard
const val MEDIUM_BLUE: Int = 205
Link copied to clipboard
const val MEDIUM_ORCHID: Int = 12211667
Link copied to clipboard
const val MEDIUM_PURPLE: Int = 9662683
Link copied to clipboard
const val MEDIUM_SEA_GREEN: Int = 3978097
Link copied to clipboard
const val MEDIUM_SLATE_BLUE: Int = 8087790
Link copied to clipboard
const val MEDIUM_SPRING_GREEN: Int = 64154
Link copied to clipboard
const val MEDIUM_TURQUOISE: Int = 4772300
Link copied to clipboard
const val MEDIUM_VIOLET_RED: Int = 13047173
Link copied to clipboard
const val MIDNIGHT_BLUE: Int = 1644912
Link copied to clipboard
const val MINT_CREAM: Int = 16121850
Link copied to clipboard
const val MISTY_ROSE: Int = 16770273
Link copied to clipboard
const val MOCCASIN: Int = 16770229
Link copied to clipboard
const val NAVAJO_WHITE: Int = 16768685
Link copied to clipboard
const val NAVY: Int = 128
Link copied to clipboard
const val OLD_LACE: Int = 16643558
Link copied to clipboard
const val OLIVE: Int = 8421376
Link copied to clipboard
const val OLIVE_DRAB: Int = 7048739
Link copied to clipboard
const val ORANGE: Int = 16753920
Link copied to clipboard
const val ORANGE_RED: Int = 16729344
Link copied to clipboard
const val ORCHID: Int = 14315734
Link copied to clipboard
const val PALE_GOLDEN_ROD: Int = 15657130
Link copied to clipboard
const val PALE_GREEN: Int = 10025880
Link copied to clipboard
const val PALE_TURQUOISE: Int = 11529966
Link copied to clipboard
const val PALE_VIOLET_RED: Int = 14381203
Link copied to clipboard
const val PAPAYA_WHIP: Int = 16773077
Link copied to clipboard
const val PEACH_PUFF: Int = 16767673
Link copied to clipboard
const val PERU: Int = 13468991
Link copied to clipboard
const val PINK: Int = 16761035
Link copied to clipboard
const val PLUM: Int = 14524637
Link copied to clipboard
const val POWDER_BLUE: Int = 11591910
Link copied to clipboard
const val PURPLE: Int = 8388736
Link copied to clipboard
const val REBECCA_PURPLE: Int = 6697881
Link copied to clipboard
const val RED: Int = 16711680
Link copied to clipboard
const val ROSY_BROWN: Int = 12357519
Link copied to clipboard
const val ROYAL_BLUE: Int = 4286945
Link copied to clipboard
const val SADDLE_BROWN: Int = 9127187
Link copied to clipboard
const val SALMON: Int = 16416882
Link copied to clipboard
const val SANDY_BROWN: Int = 16032864
Link copied to clipboard
const val SEA_GREEN: Int = 3050327
Link copied to clipboard
const val SEA_SHELL: Int = 16774638
Link copied to clipboard
const val SIENNA: Int = 10506797
Link copied to clipboard
const val SILVER: Int = 12632256
Link copied to clipboard
const val SKY_BLUE: Int = 8900331
Link copied to clipboard
const val SLATE_BLUE: Int = 6970061
Link copied to clipboard
const val SLATE_GRAY: Int = 7372944
Link copied to clipboard
const val SLATE_GREY: Int = 7372944
Link copied to clipboard
const val SNOW: Int = 16775930
Link copied to clipboard
const val SPRING_GREEN: Int = 65407
Link copied to clipboard
const val STEEL_BLUE: Int = 4620980
Link copied to clipboard
const val TAN: Int = 13808780
Link copied to clipboard
const val TEAL: Int = 32896
Link copied to clipboard
const val THISTLE: Int = 14204888
Link copied to clipboard
const val TOMATO: Int = 16737095
Link copied to clipboard
const val TURQUOISE: Int = 4251856
Link copied to clipboard
const val VIOLET: Int = 15631086
Link copied to clipboard
const val WHEAT: Int = 16113331
Link copied to clipboard
const val WHITE: Int = 16777215
Link copied to clipboard
const val WHITE_SMOKE: Int = 16119285
Link copied to clipboard
const val YELLOW: Int = 16776960
Link copied to clipboard
const val YELLOW_GREEN: Int = 10145074