` You can use this method to generate a single random color set
Red = Random(0,255)
Grn = Random(0,255)
Blu = Random(0,255)
Shade = MakeColor(Red,Grn,Blu)
`Or this method to make several color sets
Shade_1 = MakeColor (Random(0,255),Random(0,255),Random(0,255))
Shade_2 = MakeColor (Random(0,255),Random(0,255),Random(0,255))
Shade_3 = MakeColor (Random(0,255),Random(0,255),Random(0,255))
Shade_4 = MakeColor (Random(0,255),Random(0,255),Random(0,255))
`Or a loop to make many random sets
Dim Shade[100]
For Count = 1 to 100
Shade[Count] = MakeColor (Random(0,255),Random(0,255),Random(0,255))
Next Count
`Or this method to make a sequential color set.
Dim Shade[255]
For Count = 0 to 255
Shade[Count] = MakeColor (Count,Count,Count)
Next Count
`For 16 Million Colors
Dim Shade[16581375]
Count = 0
For CountRed = 0 to 255
For CountGrn = 0 to 255
For CountBlu = 0 to 255
Shade[Count] = MakeColor (CountRed,CountGrn,CountBlu)
Inc Count
Next CountBlu
Next CountGrn
Next CountRed
X = 0
Y = 0
X1 = 31
Y1 = 31
`Then use them likewise:
Drawbox(X,Y,X1,Y1,Shade_1,Shade_2,Shade_3,Shade_4,1)
`This method allows you to recall a stored set.
`This would work well if you were creating a color pallet box used in many drawing programs.
Drawbox(X,Y,X1,Y1,Shade[0 through Your Highest number] in place of Shade_1 etc
Help make AGK better by submitting an example for this command! (All examples are subject to approval)
` You can use this method to generate a single random color set Red = Random(0,255) Grn = Random(0,255) Blu = Random(0,255) Shade = MakeColor(Red,Grn,Blu) `Or this method to make several color sets Shade_1 = MakeColor (Random(0,255),Random(0,255),Random(0,255)) Shade_2 = MakeColor (Random(0,255),Random(0,255),Random(0,255)) Shade_3 = MakeColor (Random(0,255),Random(0,255),Random(0,255)) Shade_4 = MakeColor (Random(0,255),Random(0,255),Random(0,255)) `Or a loop to make many random sets Dim Shade[100] For Count = 1 to 100 Shade[Count] = MakeColor (Random(0,255),Random(0,255),Random(0,255)) Next Count `Or this method to make a sequential color set. Dim Shade[255] For Count = 0 to 255 Shade[Count] = MakeColor (Count,Count,Count) Next Count `For 16 Million Colors Dim Shade[16581375] Count = 0 For CountRed = 0 to 255 For CountGrn = 0 to 255 For CountBlu = 0 to 255 Shade[Count] = MakeColor (CountRed,CountGrn,CountBlu) Inc Count Next CountBlu Next CountGrn Next CountRed X = 0 Y = 0 X1 = 31 Y1 = 31 `Then use them likewise: Drawbox(X,Y,X1,Y1,Shade_1,Shade_2,Shade_3,Shade_4,1) `This method allows you to recall a stored set. `This would work well if you were creating a color pallet box used in many drawing programs. Drawbox(X,Y,X1,Y1,Shade[0 through Your Highest number] in place of Shade_1 etc