pfalstad / circuitjs1

Electronic Circuit Simulator in the Browser
GNU General Public License v2.0
1.71k stars 286 forks source link

Expose interface of neutralColor #32

Open johndoe31415 opened 1 year ago

johndoe31415 commented 1 year ago

I'm using CircuitJS a lot in lectures I'm giving. One issue that was raised to me is that for people with color deficient vision, colors might not be clearly discernible. While I can (and do) use a setting of positiveColor and negativeColor, the neutralColor is fixed at gray, which is not an ideal choice there.

CircuitElm already supports the neutralColor, but the interface is not exposed yet. I propose exposing it via the query parameters just like the other colors (positive, negative, select, current) so that it becomes easier to generate a variant that is well-readable for people with color deficient vision.

I could give that a shot once the semester is over and I have a bit of free time. Seems easy enough. Would you be interested to include this when I file a PR?

pfalstad commented 1 year ago

Hi, I have done this in my local repository and will upload it soon. I didn't see that you offered to do it yourself.