I'm attempting the icon editor challenge that I set, and by the way is open to anyone that feels up to the challenge.
In trying to create my palette I've stumbled across this problem....
First of all I load all my colors from a file into an ArrayList called PaletteColours, this works fine.
Next I wanted to draw sections of each colour on the form to use as the palette, but this is where my problem starts.
I've tried...
Which works fine but not with the colours that are expected, it produces pastel shades instead of the RGB values that are in the array list.
I suspect it is converting to a decimal value and so next I tried this...
But still got the same... Obviously because I forgot to tell it that it was an RGB value :sign0161:
But then when I tried telling it that it's an RGB value by doing this....
I get an input format exception error
Before you ask, when I place a MsgBox before the Line command I get values in this kind of format 51,0,102 and so I don't understand why it's not liking it.
Any ideas, or is this a bug :sign0085:
PS Please feel free to have a go at designing your own Icon Editor and join in the competition :sign0060:
Regards,
RandomCoder
In trying to create my palette I've stumbled across this problem....
First of all I load all my colors from a file into an ArrayList called PaletteColours, this works fine.
Next I wanted to draw sections of each colour on the form to use as the palette, but this is where my problem starts.
I've tried...
B4X:
For Index=0 To PaletteColour.Count-1
'... Adjust X1 and Y1 positions
Designer.Line(X1,Y1,X1+10,Y1+10,PaletteColour.Item(Index),BF)
Next
Which works fine but not with the colours that are expected, it produces pastel shades instead of the RGB values that are in the array list.
I suspect it is converting to a decimal value and so next I tried this...
B4X:
For Index=0 To PaletteColour.Count-1
'... Adjust X1 and Y1 positions
Colour=PaletteColour.Item(Index)
Designer.Line(X1,Y1,X1+10,Y1+10,Colour,BF)
Next
But still got the same... Obviously because I forgot to tell it that it was an RGB value :sign0161:
But then when I tried telling it that it's an RGB value by doing this....
B4X:
For Index=0 To PaletteColour.Count-1
'... Adjust X1 and Y1 positions
Colour=PaletteColour.Item(Index)
Designer.Line(X1,Y1,X1+10,Y1+10,RGB(Colour),BF)
Next
I get an input format exception error
Before you ask, when I place a MsgBox before the Line command I get values in this kind of format 51,0,102 and so I don't understand why it's not liking it.
Any ideas, or is this a bug :sign0085:
PS Please feel free to have a go at designing your own Icon Editor and join in the competition :sign0060:
Regards,
RandomCoder