Hexcode Error in Import (RegEx?)

riskit avatarriskit 13 months
{"ops":[{"insert":"Hello Dev Team,\n\nI edited my Deck via the Import menu., saved it and an an an error occurred: \n\n"},{"attributes":{"bold":true},"insert":"'Syntax Errors: .... The tag color: \"#000\" is not a valid hex color'"},{"insert":"\n\nAs you see, I used the color black in one of my tags :) But I didn't set the color via hexcode, I did it with the color picker. He shortened the hexcode all by itself.\nThink best would be to edit the regex? A hexcode can also consists only 3 chars, when i remember right.\n\nPS:\nAfter I edited the hexcodes in the import prompt window to 6 chars (just added 000) it worked fine.\n\ncheers.\nriskit\n"}]}
Edited 3/9/2023, 8:52:35 AM
0
{"ops":[{"insert":"Three digit hex code notation is shorthand for six digit hex code notation. So in black's case it'd be "},{"attributes":{"bold":true},"insert":"#000000 "},{"insert":"rather than "},{"attributes":{"bold":true},"insert":"#000"},{"insert":".\n\nWhile technically speaking the three digit isn't incorrect, we'd have to forcibly change your code to the full 3 digit code, which might confuse people (because we'd be changing the value you inputed). \n\nImo not super worth doing. Especially considering most people aren't editing hex values manually.\n"}]}
0
riskit avatarriskit 13 months
{"ops":[{"insert":"I didn't edit the hex values. I just added some cards via the Import menu. Then the error occurred, which forced me to edit the hex codes.\n\nEDIT:\nIt seems like you save the variable of the short version of the hexcode, when a new tag color is defined. I tested it by myself a few seconds ago:\nI create a new Tag."},{"attributes":{"list":"ordered"},"insert":"\n"},{"insert":"I choose the color black by the color picker. (shown hexcode is #000000)"},{"attributes":{"list":"ordered"},"insert":"\n"},{"insert":"Save"},{"attributes":{"list":"ordered"},"insert":"\n"},{"insert":"Hexcode of the Tag is: #000"},{"attributes":{"list":"ordered"},"insert":"\n"},{"insert":"Going to import menu to add some cards."},{"attributes":{"list":"ordered"},"insert":"\n"},{"insert":"save"},{"attributes":{"list":"ordered"},"insert":"\n"},{"insert":"Error occures: ^black,#000^: The tag color \"#000\" is not a valid hex color."},{"attributes":{"list":"ordered"},"insert":"\n"},{"insert":"\nSo. I didn't change any hexcodes in this example.\nScreenshot in my onedrive: "},{"attributes":{"link":"https://1drv.ms/u/s!AjCfx4cSyM-WntRKGCjF_LbQ-zsFzg?e=iX3cWW"},"insert":"https://1drv.ms/u/s!AjCfx4cSyM-WntRKGCjF_LbQ-zsFzg?e=iX3cWW"},{"insert":"\n"}]}
Edited 3/16/2023, 12:09:06 PM
0