diff --git a/js/meta-parser.js b/js/meta-parser.js index 8eaf9c61..08e53181 100644 --- a/js/meta-parser.js +++ b/js/meta-parser.js @@ -12,7 +12,11 @@ var metaParser = (() => { }, color: state => { if (state.value !== null) { - colorConverter.format(colorConverter.parse(state.value), 'rgb'); + const color = colorConverter.parse(state.value); + if (!color) { + throw new Error(`invalid color: ${state.value}`); + } + state.value = colorConverter.format(color, 'rgb'); } } }