In my case, I had used a headline element, but it doesn’t work in the simple text element either!
I also tried as you described with the single quotes for the style attribute and the double quotes for the dynamic content.
As long as you don’t leave the HTML editor or just close it before switching to the others, it works:
Switching to the raw editor and back is also no problem.
But switching to the Rich Text Editor changes something.
The color is set to transparent and the quotation marks are automatically swapped. So the style attribute gets double quotation marks and the dynamic content gets single quotation marks.
And even if you then manually swap the quotation marks again, the color does not return. It only works again if you add the color completely new via the dynamic selection menu.