Aggrid cell color change based on indices

I’d like to know how I can change cell color based on row indices. For context, I have an array of filtered cell indices from a column based on a condition. I want to change color only on these cells. I’ve seen examples of js injection using params.value to change cell color based on the value itself, I’d wanna do this based on the indices