I am working on an animation that involves a box fading from its original color to yellow. However, I would like to achieve the opposite effect: when the page loads, I want the box to start off as yellow and then fade back to its original color. The challenge is that the original color is dynamic, so I cannot simply hardcode the reverse animation.
Below is the code for the animation trigger:
animations: [
trigger('highlight', [
state('true', style({
'background-color': '#edf514'
})),
transition('* => true',
animate('0.8s')
)
])
]