mapfish. ColorRgb

Class for representing RGB colors.

Summary
mapfish. ColorRgbClass for representing RGB colors.
Constructor
mapfish. ColorRgb
Functions
equalsReturns true if the colors at the same.
setFromHexSets the color from a color hex string
setFromRgbSets the color from a color rgb string
toHexStringConverts the rgb color to hex string
getColorsArrayByRgbInterpolationGet an array of colors based on RGB interpolation.

Constructor

mapfish. ColorRgb

Parameters

red{Integer}
green{Integer}
blue{Integer}

Functions

equals

equals: function(color)

Returns true if the colors at the same.

Parameters

{mapfish.ColorRgb} color

setFromHex

setFromHex: function(rgbHexString)

Sets the color from a color hex string

Parameters

rgbHexString{String} Hex color string (format: #rrggbb)

setFromRgb

setFromRgb: function(rgbString)

Sets the color from a color rgb string

toHexString

toHexString: function()

Converts the rgb color to hex string

getColorsArrayByRgbInterpolation

mapfish.ColorRgb.getColorsArrayByRgbInterpolation = function(firstColor,
lastColor,
nbColors)

Get an array of colors based on RGB interpolation.

Parameters

firstColor{<mapfish.Color>} The first color in the range.
lastColor{<mapfish.Color>} The last color in the range.
nbColors{Integer} The number of colors in the range.

Returns {Array({<mapfish.Color>})} The resulting array of colors.

equals: function(color)
Returns true if the colors at the same.
setFromHex: function(rgbHexString)
Sets the color from a color hex string
setFromRgb: function(rgbString)
Sets the color from a color rgb string
toHexString: function()
Converts the rgb color to hex string
mapfish.ColorRgb.getColorsArrayByRgbInterpolation = function(firstColor,
lastColor,
nbColors)
Get an array of colors based on RGB interpolation.
Close