$color
$color is a material shader parameter available in all Source games. It independently scales the red, green and blue channels of an albedo.
Last updated
Was this helpful?
$color is a material shader parameter available in all Source games. It independently scales the red, green and blue channels of an albedo.
Last updated
Was this helpful?
$color
is a parameter available in all Source games. It independently scales the channels of an . There are two ways of expressing a value:
The default is or .
Course uses a gamma correction of 2.2 by default. This must be taken into account when attempting to adjust the color of a texture to match some other color in a screenshot (for example, when trying to match the color of the bottom of a skybox material to the color of fog in the map). This is done by raising the initially calculated scale to the power of 2.2 before setting the $color
value for your material. For example, if the sample (target) color in a screenshot is 120, the color of your texture at the point of interest is 240, and you want the two colors to match, you need to compute the scale for your material as (not 0.5, as one might expect).
This parameter can be used without an to display a solid color without the need of a texture (except a ). As well as a small saving in performance and memory footprint, can be used to completely change the material's color at run-time if desired.
In this scenario, "[1 1 1]"
is pure white.
A variant of $color
named $color2
is specific for use with . It works the same way as $color
but for use on models.
Enables the use of an alpha mask to define areas on the model to tint. Uses the alpha channel of the $basetexture.
Prevents the model's material from being tinted by $color2
or rendercolor.
Bug: Incompatible with and .
Sets the amount to replace with solid color. A value of '0' will be full tint while a value of '1.00' will replace the in the mask area with the color defined with $color2.
Default value is '0'.
**Note:**This parameter is not available in and .
Use a separate texture as a mask for color tinting instead of the 's alpha. Only the green channel is used for tinting.
Prevents the model's material from being tinted by $color2
or rendercolor.
Replaces $allowdiffusemodulation
in .
$color2
is incompatible with the use of , as it will override the glow properties used by both $selfillum
& $selfillummask
. Use the $selfillumtint
command to adjust the glow so it properly appears.
Source: