In this recipe, we will use the animation_datetime() function, which is exposed by Time Manager to create a time-dependent style for our animation. The style will represent the age of the event feature: the event marker's fill color will fade towards gray the older the event gets.
To follow this recipe, please load ACLED_africa_fatalities_dec2013.shp and configure Time Manager, as shown in the Exploring spatiotemporal vector data using Time Manager recipe, with the following exception: when adding the layer to Time Manager, set the End time value to the FOREVER attribute.
To create a time-dependent style, we use the Data defined properties option of the Simple marker:

Here is our color expression in more detail:
color_hsla(
0,
scale_linear(
day(age(todatetime(animation_datetime()),
todatetime("EVENT_DATE"))),
0,31,
100,0
),
50,
128
)The expression consists of multiple parts, as follows:
day(age(todatetime(animation_datetime()),todatetime("EVENT_DATE"))): This calculates the number of days between the current animation time given by animation_datetime() and calculates EVENT_DATEscale_linear: This transforms the age value (in days between 0 to 31 days) into a value between 100 and 0 which is suitable for the saturation parameter of the following color functioncolor_hsla: This is one of many functions that are available in QGIS to create colors. It returns a string representation of a color, based on its attributes for hue (0 equals red), saturation (between 0 and 100 depending on our age function), lightness (50 equals medium lightness) and alpha (128 equals 50% transparency)You can speed up the fading effect by reducing the scale_linear parameter, domain_max, from 31 days to a smaller value, such as 7, for a complete fade to gray within one week.