How to change color of div according to api result

How to change color of div according to api result data
I’m building appointment calendar in which i have to show the user whether the appointment can be taken on the specific data or not.

Hello,

maybe you are looking for something like that https://codecraft.tv/courses/angular/built-in-directives/ngstyle-and-ngclass/

Best regards, anna-liebt

thanks for the help made my day @anna_liebt