If you want to color a grid with css it is to much effort to do that, if it is possible at all. The easiest way to do this is using a microflow to set an enumeration. And because you can attach an image to the enum you can simulate that the grid will be colored in the color you want all you have to do is create an image for each enum value.
In your example you probably want to use a calculated attribute with the type enum. Create a microflow that checks if the enddate is before after or equal to the current date. (Because a datetime attribute also contains the time make sure that you trim all date to days before comparing them) Than depending of the outcome of the comparison return the enum value (past, today, future)
If you want to do this but when you use only static values in your comparison it will be faster if you use a commit action. But this can only work when the outcome of the check can only change when the object changes.