Sets light color (0-255 RGB, multiplied with surface color and intensity).
Takes light (light entity handle), r/g/b (red/green/blue 0-255).
Returns nothing.
3D Graphics
Parameters & Returns
Parameters
lightInt
rInt
gInt
bInt
Returns
Void
Quick Summary
Sets light color (0-255 RGB, multiplied with surface color and intensity).
Takes light (light entity handle), r/g/b (red/green/blue 0-255).
Returns nothing.
Technical Exegesis...
Sets light color (0-255 RGB, multiplied with surface color and intensity). Takes light (light entity handle), r/g/b (red/green/blue 0-255). Returns nothing. Validates entity is ENTITY_LIGHT type, converts RGB from 0-255 to 0.0-1.0 floats, sets light->color=(r/255, g/255, b/255). Light color tints illuminated surfaces.
This function sets light color. Color conversion: RGB values 0-255 converted to 0.0-1.0 floats (standard shader format).
Sets light color (0-255 RGB, multiplied with surface color and intensity). Takes light (light entity handle), r/g/b (red/green/blue 0-255). Returns nothing. Validates entity is ENTITY_LIGHT type, converts RGB from 0-255 to 0.0-1.0 floats, sets light->color=(r/255, g/255, b/255). Light color tints illuminated surfaces.
This function sets light color. Color conversion: RGB values 0-255 converted to 0.0-1.0 floats (standard shader format). Color application: finalColor = surfaceColor * lightColor * lightIntensity * attenuation, light color multiplies with surface albedo and intensity. Use cases: (1) White light (255,255,255 for neutral illumination, most realistic), (2) Warm light (255,200,150 for sunset, firelight, tungsten bulbs), (3) Cool light (150,200,255 for moonlight, fluorescent, ice), (4) Colored lights (255,0,0 red for alarm, 0,255,0 green for alien atmosphere), (5) Dynamic effects (flash light color for explosions, transitions). Common patterns: white b3dLightColor(light, 255,255,255), warm fire b3dLightColor(light, 255,150,100), cool moon b3dLightColor(light, 150,180,255), red alarm b3dLightColor(light, 255,0,0). Typical usage: set color once during light creation for fixed color, animate color over time for dynamic effects (pulsing, color shifts). Color tinting: colored lights tint surfaces (red light on white wall = red wall, red light on blue wall = dark/black due to multiplication), use white light for neutral illumination. Intensity interaction: light color and intensity separate (color is hue/tint, intensity is brightness), both multiply together (bright red = (1,0,0) * 2.0 intensity, dim white = (1,1,1) * 0.5 intensity). Default color: lights default to white (1,1,1) if not set. Performance: O(1) setting (simple struct assignment, no rendering cost until next frame). Validation: prints error if invalid light handle or non-light entity. Related: b3dLightIntensity sets brightness multiplier, b3dCreateLight creates light entity, b3dAmbientLight sets global ambient color (different from light color).