diff --git a/files_wcf/js/Bastelstu.be/Chat/Command/Color.js b/files_wcf/js/Bastelstu.be/Chat/Command/Color.js index 93399e7..a9173c9 100644 --- a/files_wcf/js/Bastelstu.be/Chat/Command/Color.js +++ b/files_wcf/js/Bastelstu.be/Chat/Command/Color.js @@ -18,7 +18,10 @@ define(['../Command', '../Parser'], function (Command, Parser) { getParameterParser() { // Either match a color in hexadecimal RGB notation or a color name (just letters) const color = Parser.F.try( - Parser.RGBHex.map((color) => ({ type: 'hex', value: color })) + Parser.RGBHex.map((color) => ({ + type: 'hex', + value: color.replace(/^#/, ''), + })) ).or(new Parser.X().word().map((word) => ({ type: 'word', value: word }))) // Either match a single color or two colors separated by a space