Skip to content

EntityColor

Claude edited this page Oct 26, 2026 · 6 revisions

EntityColor

Command Index · Blitz3D · Entities

EntityColor entity%, red#, green#, blue#

Works in: Blitz3D

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.

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

EntityColor

Parameter Type Default Description
entity Int required Entity handle.
red Float required Red part, 0 to 255.
green Float required Green part, 0 to 255.
blue Float required Blue part, 0 to 255.

Related commands

Command Index · Blitz3D · Entities

Home · Command Index


Getting started

Language

Tools


Language Features
BlitzBasic
Blitz3D
BlitzPlus
Differences

More

Clone this wiki locally