SetColor

BlitzMax Forums/BlitzMax Programming/SetColor

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.

28*65536+197*256+224

OR you can have this

Type TRgb						'A Colour Tri
	
	Field FRed:Int
	Field FGreen:Int
	Field FBlue:Int
'				-------------------------------
Method Set:TRgb(ARed:Int,AGreen:Int,ABlue:Int)
	
	Self.FRed	= ARed
	Self.FGreen	= AGreen
	Self.FBlue	= ABlue
	Return Self
	
End Method
'				-------------------------------
Function Create:TRgb(ARed:Int=0,AGreen:Int=0,ABlue:Int=0)
	
	Return New TRgb.Set(ARed,AGreen,ABlue)
	
End Function
'				--------------------------------
Method CreateCopy:TRgb()

	Return TRgb.Create (Self.FRed,Self.FGreen,Self.FBlue)
	
End Method
'				--------------------------------
Method SetDim (APercent:Int)
	
	Self.FBlue:* (APercent/100.0)
	Self.FGreen:* (APercent/100.0)
	Self.FBlue:* (APercent/100.0)
	
End Method

End Type