Color constructor

Color([
  1. dynamic r,
  2. double? g,
  3. double? b
])

Color class. r g b value range (0.0 ~ 1.0) var color = Color(0xff00ff); var color = Color(1.0, 0.0, 1.0); var color = Color("#ff00ee"); r is THREE.Color, hex or string

Implementation

Color([r, double? g, double? b]) {
  if (g == null && b == null) {
    // r is THREE.Color, hex or string
    set(r);
  } else {
    setRGB(r.toDouble(), g, b);
  }
}