Based on your description, I understand that you want to set SharePoint list column background color according to column contents.
Here’re steps:
1.Edit page -> Add a content editor web part.
2.Press F12, find column ID.
3.Edit page -> Edit source -> Add codes which are put in the attachment-code.txt.
Note: You should replace "ms-vb-lastCell.ms-cellstyle.ms-vb2.ms-vb-lastCell" with ID found in previous step.
4.Result
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.