Since you accepted the above answer, here is another way I think it could be better as am not sure appending color like that inside links is a good idea.
You can rely on CSS variable and do something like this:
Or you can directly apply inline-style:
Or use data-attribute:
a[data-color="red"] {
color:red;
}
a[data-color="blue"] {
color:blue;
}
a[data-color="green"] {
color:green;
}
link 1
link 2
link 2