This is actually a good question and it comes up a lot because the OP brushes over the mechanics in an attempt to make it easier to understand. In actuality, the mechanics are really quite simple if you know how Pandemic works. Let's take the spell Agony as an example, a DoT with a base duration of 24 seconds:
Red means that your current stats are worse than the the stats that you had when you first cast Agony AND the current duration of Agony is greater than 12 seconds (half of the base duration of Agony which is 24 seconds). Recasting at this point would be unwise because you'd clip the original Agony which was potentially much stronger than if you were to cast it right now.
Green is the opposite of Red. In this scenario your stats are better than the stats that you had when you first cast Agony AND the current duration of Agony is less than 12 seconds. You should recast RIGHT NOW unless you know for a certain fact that you are about to get another proc or are about to cast Dark Soul or pop a trinket. The reasoning behind this is because you want to get maximum duration for your new Agony while your stats are good.
Blue and Yellow are not as straight-forward. Blue means that your current stats are better than the stats that you had when you first cast Agony AND the the current duration of Agony is greater than 12 seconds, just like when you were in Red. The question here (which is entirely unanswered) is, at what stat power is it worth recasting my Agony even if I'm going to clip over my existing Agony? Should I wait until Agony duration drops to 12 seconds and it goes Green or should I recast now because my proc is about to fall off? If my pre-existing Agony power is 200 and my current power is 500+ then it seems really quite obvious that I should overwrite my old Agony to get a DPS increase. But, say my pre-existing power is 200 and my current power is something like 275. Should I still overwrite or will I lose DPS by doing so? Like I said, no one has the math (yet) to tell you when exactly you should refresh in a "Blue" situation and you will have to wing it until someone does come up with the math.
Yellow means that your current stats are worse than the stats you had when you first cast Agony BUT the current duration of Agony is less than 12 seconds which allows you to recast Agony without clipping. But Yellow is also somewhat uncertain. If you get a proc right after you recast a Yellow Agony then you just potentially lost DPS by refreshing too early. However, if some of your procs are about to fall off (e.g., Jade Spirit or Yu'lon Blessing) and you're still Yellow, you may want to consider recasting anyway.
As you can see the OP was simplified for a good reason... it can get complicated! There's no math that shows the optimal time to recast DoTs in a given encounter. Start raiding with the addon and getting used to tracking your procs and their internal cooldowns. AffDots is a great tool but it won't tell you how to play!
In summary, using Agony (with a base duration of 24 seconds) as an example:
Red: pre-existing Agony stats > current stats (if you were to cast Agony right now) AND current duration of Agony > 12 seconds
Green: pre-existing Agony stats < current stats AND current duration of Agony < 12 seconds
Blue: pre-existing Agony stats < current stats AND current duration of Agony > 12 seconds
Yellow: pre-existing Agony stats > current stats AND current duration of Agony < 12 seconds