ColorHelper.GetLitColor

This method applies lighting to a color.
For instance, a color that has a lighting factor of 1 applies, appears at its original value.
A color with a lighting factor of 0.5 appears only half as bright as it was before.
A color with a lighting factor of 1.5 appears roughly twice as bright as before.
A color with a lightning factor of 2 appears white.

public static Color GetLitColor( Color originalColor,
	float lightFactor );

Return Value

Lit color

Parameters

originalColor
Base color

lightFactor
Amount of light applied to the color


Remarks

This routine is very fast. Even when using it in tight loops, I (Markus) have not been able to
meassure a significant amount of time spent in this routine (always less than 1ms). I was originally
concerened about the performance of this, so I added a caching mechanism, but that slowed things down
by 2 orders of magnitude.

See also:

Class ColorHelper


  Last Updated: 5/23/2007 | © , 2007