Can I use query parameters as variables in stylus?

I would really like to be able to say

a {
    color: $COLOR;
}

and request it with /styles.css?COLOR=red. Is there any way I can do this? I'll also accept $_GET['COLOR'] or something similar.

If there is no direct support for this (and I couldn't find any), is there any way I can utilize the compile function to accomplish this?

You'll need to code this as a 2-step process:

  1. Use regular express code with a simple templating language like ejs or underscore templates to interpolate the color value into the stylus file.
  2. Then render the stylus file and respond with the CSS