Mixes two colors, s would be a number 0<=s<=1 that determines the weight given to color c2.
c1.mix(c2,0) = c1 c1.mix(c2,1) = c2
c1.mix(c2,0.5) = Mixing the colors c1 and c2 in equal proportions.
public tuple color(int red, int green, int blue)
Tuple for your RGB color needs. 0 = black, 255 = full color
public tuple colorA(int red, int green, int blue, int alpha)
Tuple for your RGBA color needs. 0 = black/transparent, 255 = full color/opaque
public tuple colorHSV(real h, real s, real v)
Tuple for your HSV(Hue Saturation Value) color needs. All values 0-1
public function fromHexString(string number) returns colorA
Get a colorA tuple from a hexstring
public function makeColor(int colo) returns colorA
public function toHex(int number) returns string
Converts and int to a hexnumber
public function toDec(string twochar) returns int
Converts a twochar string to an int
public function toPlayerFromColorName(string colorName) returns player
Returns the player that corresponds to described color. Returns null if a bad string is provided. See PLAYER_COLOR_NAMES for options. Returns players based on starting color, not current color (does not respect SetPlayerColor)
public function player.getNameColored(boolean removeHash) returns string
public function player.getNameColored() returns string
public function playercolor.getName() returns string
Returns the name of the player color
public function playercolor.toColor() returns color
Returns the color associated with the playercolor
public function color.withAlpha(int a) returns colorA
Add an alpha value to a simple color tuple
public function colorA.withoutAlpha() returns color
public function color.toHSV() returns colorHSV
Returns the HSV equivalent
public function colorHSV.toRGB() returns color
Returns the RGB equivalent
public function color.normalize() returns color
public function color.lerp(color target, real smoothness) returns color
public function colorA.mix(colorA c2, real s) returns colorA
public function unit.setVertexColor(colorA col)
Set a units color to the tuplevalues with alpha
public function unit.setVertexColor(color col)
Set a units color to the tuplevalues without alpha
public function colorA.toColorString() returns string
| Returns a string that is in the wc3 hexcolor format ( | caarrggbb) |
public function color.toColorString() returns string
| Returns a string that is in the wc3 hexcolor format ( | crrggbb) |
public function color.toString() returns string
Returns the tuple in string format color(r,g,b)
public function colorA.toString() returns string
Returns the tuple in string format colorA(r,g,b,a)
public function colorHSV.toString() returns string
Returns the tuple in string format colorHSV(h,s,v)
public function color.getName() returns string
Gets the name of the color. Only works on player colors. See PLAYER_COLORS.
public function string.toColor() returns color
Returns the color that the string describes. Only works on player colors.
public function string.toPlayerColor() returns playercolor
Returns the player color that the string describes. Only works on player colors.
public function string.color(string which) returns string
public function string.color(color which) returns string
public function string.color(colorA which) returns string
public constant hexs = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"]
Hexadecimal numbers
public constant COLOR_WHITE = colorA(255,255,255,255)
public constant COLOR_BLACK = colorA(0,0,0,0)
public constant COLOR_GOLD = colorA(255, 204, 0, 255)
public constant COLOR_WHITE_STR = COLOR_WHITE.toColorString()
public constant COLOR_BLACK_STR = COLOR_BLACK.toColorString()
public constant COLOR_GOLD_STR = COLOR_GOLD.toColorString()
public constant DEFAULT_COLOR_NAME = "black"
public constant MAX_PLAYER_COLORS = 23
public constant PLAYER_COLORS = [
Player color array. Access through playercolor.toColor()
public constant PLAYER_COLOR_NAMES = [
Player color names array. Access through playercolor.getName()