SetColor()<- with a string?

BlitzMax Forums/BlitzMax Beginners Area/SetColor()<- with a string?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Well I've been trying to make a methode within a function to set the color of my text box but then it gave me an error which I think means I have to separate the red, green and blue... Let's see:
	Method SGFX( img:String, col1:String, col2:String, col3:String )
		image	= img
		col1	= color1
		col2	= color2
		col3	= color3
	End Method

so then poof error
	Method Update()
	

		' Drawing
		SetColor(color1)
		DrawRect x, y, w, h

If I have to put a code to separate the R G B from the string in the loop won't that inder game performance? Since I don't need to recheck the color unless it's changed.. hmm but then again .. ohh ohh i could set an if statement to only separate the R G B whenever it changes thus not always redoing the code thus not indering my game's performance!? :O

Another question how would I manipulate a string to read the numbers at start to "," and then the next tilll the other "," and then the next one till end of string? ("0,0,0") into separate variable that i could call colorR, colorG, colorB..

Thanks for the help.