Class: ol.Color

ol.Color

new Color

Parameters:
Name Type Description
r number Red, 0 to 255.
g number Green, 0 to 255.
b number Blue, 0 to 255.
a number Alpha, 0 (fully transparent) to 1 (fully opaque).
Source:
  • color.js, line 15

Members

a :number

Source:
  • color.js, line 35

b :number

Source:
  • color.js, line 30

g :number

Source:
  • color.js, line 25

r :number

Source:
  • color.js, line 20

Methods

<static> createFromString

Parameters:
Name Type Argument Description
str string String.
a number <optional>
(Optional) Alpha.
Source:
  • color.js, line 45
Returns:
Color.
Type
ol.Color

<static> equals

Parameters:
Name Type Description
color1 ol.Color Color 1.
color2 ol.Color Color 2.
Source:
  • color.js, line 57
Returns:
Equals.
Type
boolean