Add style attribute to view fields I would like to add a style attribute to each title fields in my view. I have created one field for a color. I tried to rewrite the result like this:

&lt;h2 style="color: [field_color];"&gt;[title_1]&lt;/h2&gt;


But the style attribute will be removed. I'm using Drupal 7.

Any help appreciated.
You can set a class to the title field using Style Settings as shown below screen. You can user token replacements in style settings to set class to the title field.



Using small javascript or jquery read the class of title field and set the color same as class name using CSS property.