I am trying to replace ul > li background color with image it is condition-based depending on #color. I have tried with css but no luck.
Help is appreciated
<ul class="tt-options-swatch options-middle filtres-js">
<li>
<a class="options-color" style="background:#000000" href="/collections/black">Black</a>
</li>
<li>
<a class="options-color" style="background:#FFFFFF" href="/collections/white">White</a>
</li>
<li>
<a class="options-color" style="background:#ccccff" href="/collections/violet">Violet </a>
</li>
</ul>
So what I am trying to do is IF style="background:#ccccff" then replace with image.
Thanks in advance.
Regards