p4535992 / foundryvtt-rarity-colors

MIT License
0 stars 1 forks source link

[Suggestion] Expose API method to get the color from an item #5

Closed Haxxer closed 1 year ago

Haxxer commented 1 year ago

Rarity Colors is supported in Item Piles, and I would like to be able to retrieve the color of any given item.

If possible, something like this would be nice:

const color = game.modules.get("rarity-colors").api.getColorForItem(item);

The return value could be a color hex code string or false if no color was found for the given item.

p4535992 commented 1 year ago

Sure

p4535992 commented 1 year ago

Done with 0.3.5, https://github.com/p4535992/foundryvtt-rarity-colors/blob/master/wiki/api.md. Let me know it if is enough.