Change Pie Chart color dynamically based on segment percentage value

Hello there,

Does anyone know if it is possible to have coloring scheme for a pie chart where the segments of the pie chart would change based on their percentage value?

For example, I have pie chart with two segments: "Segment A" represents something that I'm trying to measure, and the other segment, "Segment B", represents everything else.

When "Segment A" exceeeds a certain value or falls below a certain value I need to be able to have it change colors to red/yellow/green. 

Has anyone tried this before? Or know of a work-around?

Would appreciate your assitance!