Skip to content

EntityColor

Narta Xaymar Dirks edited this page Oct 29, 2026 · 6 revisions
Blitz3D

EntityColor

EntityColor:Void entity:Int32, red:Float32, green:Float32, blue:Float32
Parameter Mode Type Default Description
entity In Int32 required Entity handle.
red In Float32 required Red part, 0 to 255.
green In Float32 required Green part, 0 to 255.
blue In 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, EntityDepthFade 〔BlitzLLVM〕, EntityDistance, EntityFX, EntityInView

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally