NadyaNayme / job-gauges

FFXIV-inspired job gauges for Runescape combat styles
BSD 3-Clause "New" or "Revised" License
8 stars 2 forks source link

Arbitrary recoloring/tinting of Components using <canvas> #45

Open NadyaNayme opened 1 month ago

NadyaNayme commented 1 month ago

Tinting only needs to be done once at startup - similar to Scaling - but it is possible to recolor image assets by tinting them. However I'm bad at math and CBF looking more into how this is done. It doesn't necessarily look the best (manually applying tint to only specific parts of an image will generally look better).

See: https://github.com/dmnsgn/canvas-tint-image which if the Type issues can be sorted out should be possible to use for exactly this purpose. I made an attempt not that long ago but the code became a convoluted mess trying to appease Typescript.

Primary purpose of this would be recoloring Residual Soul stacks and Necrosis Warning thresholds to be any desired color by the user instead of the colors I've created image assets for. Primary reason for wanting to allow this is for color blind users whom the selected colors may be difficult to differentiate.