Closed torcado194 closed 4 years ago
the issue is due to the space at the end of the hex of this color https://github.com/hundredrabbits/Themes/blob/2c7becbe4b0defa6a6e80d46ca312fd028f1075d/themes/zxspectrum.svg#L10 which causes color.js to fail on the regex
One simple fix is to change https://github.com/hundredrabbits/Themes/blob/2c7becbe4b0defa6a6e80d46ca312fd028f1075d/editor/scripts/color.js#L4 to this.hex = hex.trim()
this.hex = hex.trim()
though a more robust solution might be to support the full range of css color formats
I prefer a more strict approach, what I'll do instead is to raise a warning on this theme instead of parsing it.
Fixed with https://github.com/hundredrabbits/Themes/commit/e90f0c7fb179c19ccee22b01cc8077cdd009c49a
the issue is due to the space at the end of the hex of this color https://github.com/hundredrabbits/Themes/blob/2c7becbe4b0defa6a6e80d46ca312fd028f1075d/themes/zxspectrum.svg#L10 which causes color.js to fail on the regex
One simple fix is to change https://github.com/hundredrabbits/Themes/blob/2c7becbe4b0defa6a6e80d46ca312fd028f1075d/editor/scripts/color.js#L4 to
this.hex = hex.trim()
though a more robust solution might be to support the full range of css color formats