Regarding stripes....
You need
1. 1 image, black and white for the stripes. The stripe needs to be designed so that rotating 180 degrees will give you the opposing patterned stripe.
2. Create a sprite, setSpriteColor().
3. Create a second sprite, rotate 180 degrees, setSpriteColor()
4. GetImage()
5. Delete 2 sprites
Regarding colour selection, you can try and pick the bones out of the code below. You need the attached image also. In a nutshell, you click on the colour band and it will convert it to the associated colour.
I also combine it with a band that goes from black to white to change the saturation of the colour.
[EDIT] I posted the wrong code. This is the code to convert a position on the image to a colour. tColor is a typed variable:
type tColour
r
g
b
a
endtype
function calcColour(ret# as float, c ref as tColour)
f = floor(ret# / 16.66667)
p# = (ret# - (f * 16.66667)) / 16.66667
select f
case 0
c.r = 255
c.g = p# * 255
c.b = 0
endcase
case 1
c.r = 255 - (255 * p#)
c.g = 255
c.b = 0
endcase
case 2
c.r = 0
c.g = 255
c.b = p# * 255
endcase
case 3
c.r = 0
c.g = 255 - (255 * p#)
c.b = 255
endcase
case 4
c.r = p# * 255
c.g = 0
c.b = 255
endcase
case 5
c.r = 255
c.g = 0
c.b = 255 - (255 * p#)
endcase
endselect
endfunction
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt