What I want to achieve is something like this.
:::::::::: ...hi.... .......... .......... The hi is in the middle of the 2 colors.
I have
You could create a css gradient with two stops really close to each other: firefox css gradients. It won't be cross browser yet. The second example on this page is pretty close to what you want: webkit simple gradients (only in webkit).