Can particle color / alpha be randomized?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Novark

I have a Particle2D system, and I’d like to have the particles emit with a random alpha, but I can’t seem to find a way to do this. (i.e., each particle will have a random alpha when it is emitted)

I’m looking for something like the following, but on a per-particle basis instead of something that affects the entire particle system:

extends Particles2D

var mat = self.get_process_material()

func _ready():
    randomize()

    mat.color = Color(1, 1, 1, rand_range(0, 1))
    self.set_process_material(mat)

Is this possible in Godot?