ful1e5/notwaita-cursor

cbmp -wc option replaces wrong color

Opened this issue · 2 comments

I was trying to create a custom cursor with pink background, black outline, and white watch animation. I ran the following command:

npx cbmp -d "svg" -o "bitmaps/Notwaita-Pink" -bc '#ff00cc' -oc '#000000' -wc '#ffffff'

The result was that the png files for the watch animations all had their background colors relpaced with white. The spinner itself remained default yellow.

I was able to work around this by editing the render.json file and copying the examples. There are 4 color replacement rules for each theme in that file, so I think the cbmp command either needs to take 4 arguments or the -wc argument needs to target a different color for replacement.

Screenshot from 2024-06-25 14-20-20

There are 4 color replacement rules for each theme in that file, so I think the cbmp command either needs to take 4 arguments or the -wc argument needs to target a different color for replacement.
Certainly!

You’re right. This cursor theme has 4 color keys for replacement. The watch color key is hardcoded with #FF0000. Changing this hardcoded color to align with the theme might cause issues for other cursor themes. This is because configuration file support was added in cbmp v1.0.0, and some of my cursors still use the older method of rendering via command line.

I plan to deprecate the command-line option in favor of the configuration file approach in future updates of cbmp.

For now, if you want to customize colors, please use the configuration file. Inshallah, I will add support for variable color replacement in the next release of cbmp, using command line options.