Pyxel Edit Forum Archive
ArchiveBug reports

Hex color codes has FF in front of its real value

CandyFace
Jun 17, 2015 at 2:11 pm
A quick bug report:
The hex color codes, has ' ff '  in front of every color value, making the code itself invalid because its 8 instead of 6 in length.

An example:
The real color: ba4f38
PyxelEdit: ffba4f38

I discovered the bug while doing some 3D modelling in Blender, and tried to reuse my colors from something I made in in PE, though it either gave me something completely different or nothing at all. 

This has not been fixed in the pre-released version either, at least not the version which i have received. 
01010111
Jun 18, 2015 at 4:12 am
Does the FF represent the alpha channel?
CandyFace
Jun 18, 2015 at 10:07 am
Ahh yes of course that's it, the first two characters represent the alpha channel. 
Well then it's not a bug, however it still makes it problematic to copy/paste and use its color code in programs that does not use the ARGB color space. 
01010111
Jun 25, 2015 at 2:28 am
It actually makes my life a lot easier because I usually work in 0xAARRGGBB format, but I can totally see what you mean, and it might be inelegant to have two boxes - maybe a couple of tiny boxes directly adjacent to the AARRGGBB feild that quickly copy the color in a couple of different formats?
CandyFace
Jun 25, 2015 at 8:00 am
Yes buttons could easily fix the problem, the issue with this however is the elegance which you mention too. 
I've never personally seen ARGB hex being used in context with artistic programs, so I wonder if it really should be used, and not just get rid of. A possibly more elegant solution could be to have have a tick box in the settings panel, giving you the option to choose whether you want to use ARGB or RGB.
01010111
Jun 25, 2015 at 6:48 pm
Yeah, ARGB is hardly ever used in pure art programs, but I use it a lot in game dev. An option in the settings would be pretty useful, but I think some people using Pyxel Edit are making use of the alpha channel (although it looks like they're using the slider and not inputting it manually in the AARRGGBB field).
Danik
Jul 1, 2015 at 8:52 pm
That is indeed the alpha of the color. I guess most of the time people want to input/paste/copy RRGGBB so maybe it should be changed. Or maybe pasting is uncommon and a small drop down with options for copying the color in different formats would be a better solution. The list might include other formats too, for example with opaque red:
255,0,0
255,255,0,0
1,0,0
1,1,0,0
FF0000
FFFF0000
CandyFace
Jul 2, 2015 at 11:46 am
A dropdown menu with various other formats sounds like a superior solution, that indeed would be a better.