isaacscript-common 7.16.2 → 7.16.3

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.
@@ -19,12 +19,12 @@ function hexToRGB(self, hexString)
19
19
  if r == nil then
20
20
  error(("Failed to convert `0x" .. rString) .. "` to a number.")
21
21
  end
22
- local gString = __TS__StringSubstring(hexString, 2, 2)
22
+ local gString = __TS__StringSubstring(hexString, 2, 4)
23
23
  local g = tonumber("0x" .. gString)
24
24
  if g == nil then
25
25
  error(("Failed to convert `0x" .. gString) .. "` to a number.")
26
26
  end
27
- local bString = __TS__StringSubstring(hexString, 4, 2)
27
+ local bString = __TS__StringSubstring(hexString, 4, 6)
28
28
  local b = tonumber("0x" .. bString)
29
29
  if b == nil then
30
30
  error(("Failed to convert `0x" .. bString) .. "` to a number.")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "7.16.2",
3
+ "version": "7.16.3",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -82,13 +82,13 @@ function hexToRGB(hexString: string): [r: float, g: float, b: float] {
82
82
  error(`Failed to convert \`0x${rString}\` to a number.`);
83
83
  }
84
84
 
85
- const gString = hexString.substring(2, 2);
85
+ const gString = hexString.substring(2, 4);
86
86
  const g = tonumber(`0x${gString}`);
87
87
  if (g === undefined) {
88
88
  error(`Failed to convert \`0x${gString}\` to a number.`);
89
89
  }
90
90
 
91
- const bString = hexString.substring(4, 2);
91
+ const bString = hexString.substring(4, 6);
92
92
  const b = tonumber(`0x${bString}`);
93
93
  if (b === undefined) {
94
94
  error(`Failed to convert \`0x${bString}\` to a number.`);