1) In the dynamic layout > Presentation > Display advanced presentation options > Container CSS class > add a property (Ex. .pyNotes).
2) In preprocessing DataTransform of the flowaction which is rendering this section or somewhere you can set the property (Ex. .pyNotes) with value of css class blue_header / purple_header based on the condition you need.
3) add custom css in your skin with following code :