The code below is to demonstrate color afterimages. The user chooses a color, fixates the changing number at the center until it reach 30 (seconds), then manually switches to white to observer the aftereffect. It works fine, but I would like the clock to reset every time a new color is selected. I can't get that to happen. The Refresh code is one attempt, but it does not work. Suggestions?
Manipulate[
Graphics[{
color, Rectangle[{-1, -1}/2, {1, 1}/2]
, White, Rectangle[{-1, -1}/4, {1, 1}/4]
, If[color === White, White, Black]
, Dynamic[
Refresh[Text[Round[Clock[30]], {0, 0}],
TrackedSymbols :> {color, size}]]
}, ImageSize -> size]
, {color, {Red, Green, Blue, Yellow, White}}
, {size, 64, 256}
, ContentSize -> { 256, 256}
, Alignment -> Center]

Whiteafter 30 seconds to theIfstatement resetting the clock. – Karsten7 Jul 07 '15 at 23:28PauseandRasterizeto get a correct clock. – Karsten7 Jul 09 '15 at 10:50