How to change the fill color dynamically on the basis of the duration of press when pressed the button

I want to change the fill color dynamically on the basis of time duration of press when pressed the button.

Just like the follow:

When the time of duration is 1s , the fill color is #ffffff;

When the time of duration is 1.1s , the fille color is #ffff00;

When the time of duration is 1.2s , the fille color is #ffff11;

Or

The fill color brightness from brightness to dark dynamically as the time of pressed duration;

PLS help me, Thanks!

Hey;

Is this what you are looking for?

<App>
  <Panel>
    <Rectangle Color="#4CAF50" ux:Name="colorRect"/>
    <WhilePressed>
      <Change colorRect.Color="#1B5E20" Duration="5" />
    </WhilePressed>
  </Panel>
</App>

That is it, thanks!