Converting Color to Another in RGB style

Blitz3D Forums/Blitz3D Programming/Converting Color to Another in RGB style

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.

Hey Ross, can you provide me an example with multiple colors? Like Green to Blue, Blue to Red, Red to Purple and Purple to Green again. I tried it with the below example but it doesn't give me what I want.

Select this\ambientState
	Case "dawn"
		If this\ambientRange < 1.0
			this\ambientRange = this\ambientRange + speed
			
			alter_ambient( 20, 20, 20, 190, 180, 150, this\ambientRange )
			
			If this\ambientRange >= 1.0
				this\ambientRange = 1.0
				this\ambientState = "day"
			EndIf
		EndIf
				
	Case "day"
		If this\ambientRange > 0
			this\ambientRange = this\ambientRange - speed
			
			If this\ambientRange <= 0
				this\ambientRange = 0
				this\ambientState = "dusk"
			EndIf
				
			alter_ambient( 190, 180, 150, 220, 220, 220, this\ambientRange )
		EndIf
		
	Case "dusk"
		If this\ambientRange < 1.0
			this\ambientRange = this\ambientRange + speed
		
			If this\ambientRange >= 1.0
				this\ambientRange = 1.0
				this\ambientState = "night"
			EndIf
					
			alter_ambient( 220, 220, 220, 220, 190, 190, this\ambientRange )
		EndIf
				
	Case "night"
		If this\ambientRange > 0
			this\ambientRange = this\ambientRange - speed
			
			alter_ambient( 220, 190, 190, 20, 20, 20, this\ambientRange )
			
			If this\ambientRange <= 0
				this\ambientRange = 0
				this\ambientState = "dawn"
			EndIf
		EndIf
End Select