Description
I just have a idea to extend the usage of binary/hex literals outside of the math parser.
Syntax:
-0x(100,200)
This would be equivalent of
(256,512)
The reason I think this is a good idea is that some languages use hexadecimal to generate palettes. At the moment, we have to do a little bit of finicky thing to bypass the issue of conversion.
Some other suggestion for syntax:
-0x3(AABBCC,DDEEFF)
The number after -0x tells us the number of channels in the output image. So, first pixel is #AABBCC.Yes, this would mean ^ wouldn't be allowed, but for simplicity of conversion, this is fine. Other characters are permitted like [ , ] or [ / ] or [ ; ]. And of course, to enforce the numbers of characters. So, 3 would means 6 characters for each numbers, 4 would mean 8 characters, and so forth.
The reason for -0x is that 0x is reserved for numbers of 0x0x0x0 image.
And of course, you can extend this concept to binary like -0b() or -0bN() where N is the number of channels. You could argue of -0dN() for decimals, as it can be done too and it can be even easier to work with too.
Some catch is that this might require c-koi to make new color dialogs for each cases and they output 1 string variable per color. This would simplify the process of making palettes with GUI. prawnsushi for example struggled with inputs, and this alleviates that issue.