# AddParticlesColorKeyFrame

## Description

Adds a color change at a certain point in a particle's life. For example a color added with time=1 will make the particle equal the given color when it has been alive for 1 second. If color interpolation is turned on using SetParticlesColorInterpolation the particle will gradually transform from its current color to the next color. For example if you add three colors, red when time=1, green when time=2, and blue when time=3, then the particle will start its life as red (as that is the nearest color) and remain completely red until it is 1 second old. When the particle is between 1 and 2 seconds old it will gradually change from red to green until it is 2 seconds old, at this point it is completely green. When the particle is between 2 and 3 seconds old it will gradually change from green to blue until it is 3 seconds old, at this point it is completely blue. The particle will remain completely blue until the end of its life as no other colors have been added.

## Definition

AddParticlesColorKeyFrame( ID, time, red, green, blue, alpha )

void agk::AddParticlesColorKeyFrame( UINT ID, float time, UINT red, UINT green, UINT blue, UINT alpha )

## Parameters

- ID - The ID of the emitter to modify.
- time - The time that particles should become this color.
- red - The red component of the new color.
- green - The green component of the new color.
- blue - The blue component of the new color.
- alpha - The alpha component of the new color.