I've been through this same problem, I needed to paint each line of the red report pair, so I found the following solution:
<style name="style_fundo_vermelho" mode="Opaque">
<conditionalStyle>
<conditionExpression><![CDATA[new Boolean($V{REPORT_COUNT}.intValue() %2 == 0)]]></conditionExpression>
<style backcolor="#FF0000"/>
</conditionalStyle>
</style>
Here in this section I create the Style that has a Boolean condition:
(if the counter number of the line divided by 2 is = 0 then it is a even line and its background will be red)
new Boolean($V{REPORT_COUNT}.intValue() %2 == 0)
After creating this style with the name = style_background I add it to the style attribute of textField:
<textField>
<reportElement style="style_fundo_vermelho" x="658" y="1" width="90" height="16" uuid="c118ccc6-4074-4f03-9bfa-cf6c3ae8a1b9">
</reportElement>
</textField>
So you can solve your dynamic background color problem in text field by simply adapting style to your need.