Skip to content

EntityColor

Claude edited this page Oct 27, 2026 · 6 revisions
Blitz3D

EntityColor

EntityColor entity:Int32, red:Float32, green:Float32, blue:Float32
Parameter Type Default Description
entity Int32 required Entity handle.
red Float32 required Red part, 0 to 255.
green Float32 required Green part, 0 to 255.
blue Float32 required Blue part, 0 to 255.

Description

Sets the color of the entity, multiplied with its texture. The default is 255, 255, 255. With the vertex color flag of EntityFX the original ignores it and shows the vertex colors only; here it is always multiplied with them, which is the same while the vertices are white.

Examples

Graphics3D 320, 240, 0, 2
SetBuffer BackBuffer()
camera = CreateCamera()
PositionEntity camera, 0, 0, -9
light = CreateLight()
RotateEntity light, 45, 45, 0
For i = 0 To 3
	ball = CreateSphere(16)
	PositionEntity ball, i * 2.4 - 3.6, 0, 0
	Select i
		Case 0 : EntityColor ball, 255, 60, 60
		Case 1 : EntityColor ball, 60, 255, 60
		Case 2 : EntityColor ball, 60, 60, 255
		Case 3 : EntityColor ball, 255, 255, 60
	End Select
Next
RenderWorld
Flip
WaitKey

Media

EntityColor

Related Commands

EntityAlpha, EntityAutoFade, EntityBlend, EntityClass, EntityDistance, EntityFX, EntityInView, EntityName

Home · Command Index


Getting started

Language

Tools


Language Features
BlitzBasic
Blitz3D
BlitzPlus
Differences

Clone this wiki locally