Skip to main content

color_correction

color_correction icon
Point entity

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.

The same test room without color correction and with the seven looks of the table below: black and white, noir, sepia, night, golden hour, toxic and dream

One room without color correction and with seven looks

Attributes​

KeyDescriptionDefault
Nametargetname

Triggering the entity turns the look on or off, as the use type says. See Common keys.

Mastermaster

Names 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.

Start DisabledStartDisabled

Sets 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
Default No (0)
Lookup Table Filefilename

Names 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.

Maximum Weightmaxweight

Sets 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.

Default 1
Exclusiveexclusive

Sets 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
Default No (0)
Saturationsaturation

Sets how strong the colors are: 1 is normal, 0 is black and white, and a value above 1 makes the colors stronger.

Default 1
Contrastcontrast

Sets 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.

Default 1
Brightnessbrightness

Adds this much to every color: 0 is normal, 0.1 makes the picture brighter and -0.1 makes it darker.

Default 0
Gammagamma

Changes the middle tones: 1 is normal, a value above 1 makes them brighter and a value below 1 makes them darker.

Default 1
Tint Colortintcolor

Sets a color the picture is multiplied by, as strongly as Tint Amount says, so 255 200 140 gives sepia.

Default 255 255 255
Tint Amounttintamount

Sets how strong the tint is, from 0 for no tint up to 1 for the full Tint Color.

Default 0
Full Strength Distanceminfalloff

Sets 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.

Default -1
Fade-Out Distancemaxfalloff

Sets how far from the entity, in units, the look is gone, and between the two distances it fades.

Default -1
Fade In TimefadeInDuration

Sets how many seconds the look takes to fade in when you turn it on, and 0 turns it on at once.

Default 0
Fade Out TimefadeOutDuration

Sets how many seconds the look takes to fade out when you turn it off, and 0 turns it off at once.

Default 0

How 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:

LookKeys
Black and whiteSaturation 0
NoirSaturation 0, Contrast 1.5, Brightness -0.08, Gamma 0.9, Tint Color 200 215 255, Tint Amount 0.35
SepiaSaturation 0, Contrast 1.1, Brightness 0.03, Tint Color 255 200 130, Tint Amount 0.85
NightSaturation 0.5, Contrast 1.1, Brightness -0.15, Gamma 0.85, Tint Color 110 150 255, Tint Amount 0.8
Golden hourSaturation 1.25, Brightness 0.04, Gamma 1.1, Tint Color 255 190 110, Tint Amount 0.5
ToxicSaturation 0.7, Contrast 1.2, Tint Color 140 255 90, Tint Amount 0.75
DreamSaturation 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 1 set in the console, the console reports the file once
  • Players can turn color correction off by typing mat_colorcorrection 0 in the console. See Settings for more details

See also​

Changes since 1.38​

  • color_correction is new in SBO 2.1.0