After receiving no clear answers to my question in the thread Is it possible in css to give a color name an alternative HEX value?, I have decided to rephrase and repost my query for better clarity:
Imagine a website that includes code snippets like those shown below:
<span style="color:red;">+3000</span>
<span style="color:green;">-2000</span>
<span style="color:red;">+1500</span>
<span style="color:red;">+4200</span>
<span style="color:green;">-100</span>
<span style="color:black;">+/-0</span>
The codes displayed on the original site cannot be modified to include additional classes or IDs. However, I am interested in creating a separate CSS stylesheet that will change the color of plus items (originally marked in red) to green, and minus items (originally marked in green) to red for anyone loading said stylesheet. Is this possible, and if so, how can it be achieved?