toRGBAd static method

Color toRGBAd(
  1. double r,
  2. double g,
  3. double b, {
  4. double o = 1,
})

(en)Converts the double value specified by 0 to 1 to RGBA.

(ja)0~1で指定したdouble値をRGBAに変換します。

  • r : red.
  • g : green.
  • b : blue.
  • o : opacity.

Returns Color obj.

Implementation

static Color toRGBAd(double r, double g, double b, {double o = 1}) {
  return Color.fromRGBO(
      (r * 255).toInt(), (g * 255).toInt(), (b * 255).toInt(), o);
}