Would like to share another approach that worked for me. I achieved this with a suggestion in forum, but I cant find the forum link any more.
I got this working with CustomString widget, since I was already using CustomString in my project saved me from having another appstore widget in my project. Since you said you are using list view it is possible too.
In the custom string widget, I called a microflow which returned something like '<div style="height:30px; background-color: ' + $Color/ColorCode + ';"/>' where the colorcode is dynamically take from entity.
Result looks like
Indeed I also looked at the option that Tim suggested: https://appstore.home.mendix.com/link/app/108838/
Since it told something like, setting the class of Parent class I was bit doubtful if it suits my requirement and did not tried it.
I just added inline dynamic styling supper to my classContainer widget. Grab the MPK here and drop it in your project’s /widgets/ folder, then press F4 in Studio Pro.
Let me know if this works for you!
I’ll look to release it to the app store soon.
There is an AppstoreApp that does exactly that: https://appstore.home.mendix.com/link/app/108838/
Its description says: “This widget will set classes to the parent element with the help of a string result of a nanoflow and/or microflow.“
Click on a container and modify the style settings in its properties.
Hope this helps