Error "unknown named color"

I had a problem with color from the Javascript end, and I was fortunate to receive some very helpful advice from another user. Here’s the link to the comment, see if that works.