You do not need to write your own macros. There autocall maros that will generate the CX color names from percentage values and various color spaces.
The following will give display what is available;
%colormac;
%helpclr(all);

Also, in the 9.3 release there are RGBA and CMYK color names. The RGBA color specification allows you to cintrol the opacity of a color on those output formats that support it, such as PNG.

RGBAff000080 or Aff000080 a red that is 50% translucent.