Note: Written before OP added the relatively important detail that the signs are generated by Syntastic. Ergo, a general tossing of things against the wall to see what sticks rather than a quick honing in on the actual solution à la the subsequent, accepted answer. It's fine, though. :P
It seems you are at least partially aware of how this works but let's lay it out formally...
When you define the sign you specify the highlighting group to be used when that sign is displayed. (Run :hi
to see all of your currently defined groups.)
For example, a sign that will have the same background color (and foreground color!) as one's 'colorcolumn'
columns could be defined like this...
:sign define mysign text=|> texthl=ColorColumn
From there you don't need to do anything special. When you place a sign it should have the expected coloring. So let's check off some boxes. Are you/have you...
- Using a recent version of Vim?
- Making sure the highlight group has set
guibg
if you are using GUI vim or ctermbg
if you're using terminal vim?
- Defined a sign manually with a "clean" version of vim and known-to-be-working highlight group (check it with
:hi HlGroupName
)?
(By "clean" I mean you can, for example, start vim without any plugins using vim --noplugin
and/or try it without any vimrc file using vim -u NONE
.)