Gimp.color_set_alpha

function color_set_alpha(color: Gegl.Color, alpha: Number(gdouble)): void {
    // Gjs wrapper for gimp_color_set_alpha()
}
  

Update the alpha channel, and any other component if necessary (e.g. in case of premultiplied channels), without changing the format of color.

If color has no alpha component, this function is a no-op.

Since 3.0

color

a [class@Gegl.Color]

alpha

new value for the alpha channel.