toColor function

Color toColor(
  1. Vector3 v, [
  2. double opacity = 1.0
])

Convert Vector3 to Color

Implementation

Color toColor(Vector3 v, [double opacity = 1.0]) {
  return Color.fromRGBO((v.r * 255).toInt(), (v.g * 255).toInt(), (v.b * 255).toInt(), opacity);
}