Editable Grid View - change color of field based on content

I thought I could use the following code to change the field color, but it’s not working. Can anyone give me some help?

By the way this is on an Editable Grid View with a drop-down menu (select), but since I have the code onRecord I thought this would work.

 switch({priority}){
  case "L":
  sc_field_style({priority},"#d1f3ff");
  break;
  
  case "M":
  sc_field_style({priority},"#ffebef");
  break;
  
  case "H":
  sc_field_style({priority},"#ffd1dc");
  break;
  
  case "U":
  sc_field_style({priority},"#ff9eb5");
  break;
  }
 

Update: I figured it out. Evidently, it’s still only available on the grid.