color_correction

A color_correction changes the colors of the 3D view, like the entity of the same name in Source games. It can make
the view black and white, noir, sepia, night, a warm sunset or a toxic green, or apply any color grade you make in an
image editor and save as a lookup table file.
The look covers the whole map, or it gets stronger the nearer the player's view is to the entity. The HUD, the
crosshair, messages, screen fades, env_overlay pictures and menus keep their own colors.

One room without color correction and with seven looks
Attributes
targetnameTriggering the entity turns the look on or off, as the use type says. See Common keys.
masterNames a master, and while the master is off, the look is off too. It fades out when the master turns off, and fades in again when the master turns on.
StartDisabledSets whether the look is on when the map starts. A trigger turns it on or off by its use type: On turns it on, Off turns it off and Toggle switches it.
- No (0) - The look is on from the start
- Yes (1) - The look is off until you trigger it
No (0)filenameNames a color lookup table file that changes the colors of the view. It must be a .raw file in the Source format (32 by 32 by 32), which you can make with the in-game editor. A name without a folder, such as tealorange.raw, is looked for in gfx/colorcorrection/, and players download the file with the map. The game applies the simple keys below after the file, and you can't change the file while the map runs.
maxweightSets how strong the look is at full strength, from 0 for no change up to 1 for the full look. So 0.5 is halfway between the normal picture and the look.
1exclusiveSets whether this look pushes the other color corrections back while it is on.
- No (0) - The look mixes with the others
- Yes (1) - The look takes its share from every other color correction, so the others fade under it
No (0)saturationSets how strong the colors are: 1 is normal, 0 is black and white, and a value above 1 makes the colors stronger.
1contrastSets the contrast, where 1 is normal. A value above 1 makes dark parts darker and bright parts brighter, and a value below 1 makes the picture flatter.
1brightnessAdds this much to every color: 0 is normal, 0.1 makes the picture brighter and -0.1 makes it darker.
0gammaChanges the middle tones: 1 is normal, a value above 1 makes them brighter and a value below 1 makes them darker.
1tintcolorSets a color the picture is multiplied by, as strongly as Tint Amount says, so 255 200 140 gives sepia.
255 255 255tintamountSets how strong the tint is, from 0 for no tint up to 1 for the full Tint Color.
0minfalloffSets how far from the entity, in units, the look is at full strength. If one of the two distances is -1, or both are the same, the look is the same everywhere on the map.
-1maxfalloffSets how far from the entity, in units, the look is gone, and between the two distances it fades.
-1fadeInDurationSets how many seconds the look takes to fade in when you turn it on, and 0 turns it on at once.
0fadeOutDurationSets how many seconds the look takes to fade out when you turn it off, and 0 turns it off at once.
0How the looks mix
The simple keys are applied in this order: Saturation, Contrast, Brightness, Gamma and the tint. So without a file and with every simple key at its default, the entity changes nothing.
Several color corrections mix, and the four with the most weight where the view is count. A look's weight is how strong it is at that point, and when the weights add up to more than 1, they are scaled down to 1. An Exclusive look takes its share from all the others. Each player's game works out the look from where that player's view is, so spectators, the picture-in-picture view and demos follow their own camera.
Looks
These are the keys of the looks in the picture above:
| Look | Keys |
|---|---|
| Black and white | Saturation 0 |
| Noir | Saturation 0, Contrast 1.5, Brightness -0.08, Gamma 0.9, Tint Color 200 215 255, Tint Amount 0.35 |
| Sepia | Saturation 0, Contrast 1.1, Brightness 0.03, Tint Color 255 200 130, Tint Amount 0.85 |
| Night | Saturation 0.5, Contrast 1.1, Brightness -0.15, Gamma 0.85, Tint Color 110 150 255, Tint Amount 0.8 |
| Golden hour | Saturation 1.25, Brightness 0.04, Gamma 1.1, Tint Color 255 190 110, Tint Amount 0.5 |
| Toxic | Saturation 0.7, Contrast 1.2, Tint Color 140 255 90, Tint Amount 0.75 |
| Dream | Saturation 0.8, Contrast 0.65, Brightness 0.15, Gamma 1.15, Tint Color 255 210 230, Tint Amount 0.4 |
Notes
- If the game can't read the lookup table file, the entity uses only its simple keys. With
developer 1set in the console, the console reports the file once - Players can turn color correction off by typing
mat_colorcorrection 0in the console. See Settings for more details
See also
- Color correction - lookup table files and how looks mix
color_correction_volume- a look inside a brushenv_fog- fog over the whole mapenv_fade- colors the screen of players for a moment
Changes since 1.38
color_correctionis new in SBO 2.1.0