You can make a colour-activated trigger, but it matches on the first character of the matching text, in this case the hp and not the mana.
The simple solution would be to call a small script that simply decides to do it based on the number of mana points, rather than the colour, and probably do something like disable the trigger and set a timer to re-enable it in 5 seconds, so you don't drink the potion too many times in quick succession.
eg. something like this:
<triggers>
<trigger
enabled="y"
match="*h, *m ex-"
name="CheckPrompt"
script="DoPrompt"
sequence="100"
>
</trigger>
</triggers>
The script subroutines you would need are:
sub DoPrompt (name, line, wildcards)
dim count
count = CInt (wildcards (2)) ' mana points
if count < 2000 then
world.Send "drink mana"
world.EnableTrigger "CheckPrompt", 0
world.addtimer "prompt_timer", 0, 0, 5, "", 1 + 4 + 1024 + 16384, "PromptTimer"
end if
end sub
sub PromptTimer (name)
world.EnableTrigger "CheckPrompt", 1
end sub