@rpg-engine/long-bow 0.8.12 → 0.8.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -593,6 +593,14 @@ var ButtonContainer = /*#__PURE__*/styled__default.button.withConfig({
593
593
  componentId: "sc-obzd3o-0"
594
594
  })(["height:45px;font-size:", ";"], uiFonts.size.small);
595
595
 
596
+ var toUppercaseHexColor = function toUppercaseHexColor(color) {
597
+ if (!color) return undefined;
598
+ // Check if it's a valid hex color
599
+ var hexRegex = /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/;
600
+ if (!hexRegex.test(color)) return color;
601
+ return color.toUpperCase();
602
+ };
603
+
596
604
  var SpriteFromAtlas = function SpriteFromAtlas(_ref) {
597
605
  var _atlasJSON$frames, _atlasJSON$frames2;
598
606
  var atlasJSON = _ref.atlasJSON,
@@ -622,6 +630,7 @@ var SpriteFromAtlas = function SpriteFromAtlas(_ref) {
622
630
  console.error("SpriteFromAtlas: Could not find sprite with key " + spriteKey + " in atlasJSON.");
623
631
  return null;
624
632
  }
633
+ var normalizedTintColor = toUppercaseHexColor(tintColor);
625
634
  return React__default.createElement(Container$1, {
626
635
  width: width,
627
636
  height: height,
@@ -638,7 +647,7 @@ var SpriteFromAtlas = function SpriteFromAtlas(_ref) {
638
647
  style: imgStyle,
639
648
  centered: centered,
640
649
  borderRadius: borderRadius,
641
- tintColor: tintColor
650
+ tintColor: normalizedTintColor
642
651
  }));
643
652
  };
644
653
  var Container$1 = /*#__PURE__*/styled__default.div.withConfig({