rLinearGradient function
returns a rounded, length n
array of Vector3 colours. colours are evenly spaced between color1
and color2
.
Implementation
List<List<num>> rLinearGradient(num n, List<num> color1, List<num> color2) {
return linearGradient(n, color1, color2)
.map((color) => color.map((c) => c.round()).toList())
.toList();
}