Content field value as background color
Looks like the Views text area filters style="anything" out to prevent XSS attacks. If you create a template file for your view, I believe it will work.

As pointed out by @4K4


  If you put a twig variable inside of a style attribute standard
  sanitizing won't prevent . To protect against this you need to
  filter even brackets. See XSS attacks and style attributes


Therefore, you need to make sure your field is not a text field, where the user has the power to write/put whatever they want. You should use a Select list field or better yet use a color field.