Color correction
From Valve Developer Community
- For the entities used to implement color correction, see color_correction and color_correction_volume.
Color correction is the concept of altering the color balance of an image to achieve a desired effect. It is primarily used to set an emotional tone or convey important information.
- By tinting towards blue or grey, a feeling of cold or isolation is achieved (e.g. Minority Report).
- Brighter, more saturated colors like red or yellow will have the opposite effect, intensifying emotion (Hero).
- Correction can also help to replicate the effects of other mediums (Sin City).
Correction in games has the unique benefit of being dynamic. It can reflect the state of the world or player or be attached to a specific location or object.
Using the tools
Source stores color correction profiles in 'lookup tables', which are 96Kb binary files with the extension .raw. A set of in-game tools are used to create them, and they are added to maps with color_correction (point, with falloff) and color_correction_volume (brush). Correction is very cheap.
To use correction:
- Create at least one color_correction or color_correction_volume entity in your map, but do not give it a lookup table and, in the case of color_correction, disable falloff. You must be in range of the entity before the correction tools have any visible effect.
- Ensure that correction is enabled in Video options > Advanced (or set
mat_colorcorrection 1). - If you are working in a multiplayer game, enable
sv_cheats. - Type
colorcorrectionuiinto the console.
In the window that appears, correction filters can be:
- Created and managed with the buttons in the bottom of the layers window.
- Enabled or disabled by clicking their circular icon.
- Made stronger or weaker with the Blend slider.
- Duplicated with Alt + Double-click.
There is also a layers window for managing filters and a 'Lookup View' for previewing their effect on a grid of colored pixels.
The filters
- Curves - Search for tutorials
- Works in exactly the same way as a curves tool in an image editor. The horizontal axis represents a color value in the original image; the vertical axis represents its brightness in the final image. Click and drag to manipulate the line. Black is in the bottom left and white is in the top right.
Bug:Points cannot be deleted.
Bug:Drag release is only registered when the cursor is over the graph area. This makes placing points very close to its edge difficult.- Levels - Search for tutorials
- Again, this filter is directly analogous to levels tools in image editors. Both sliders control the range of colors in the image: the top slider 'cuts off' values outside its range to pure black (left) or white (right), while the bottom slider compresses the image's range to fit inside it. The top slider's middle pip weights the image's range (i.e. adjusts gamma).
Bug:If two pips come to overlap, separating them can be impossible.- Selected HSV
- This is the most complex filter. The image is a real-time thumbnail of the current scene in which colors currently selected are highlighted red. It can be clicked to select a color, or the Select button can be pressed to select a color directly from the scene (hit Esc afterwards). Hold Ctrl to select multiple colors in either situation.
- Tolerance and Fuzziness allow the selection to be tweaked; Hue, Saturation and Value (i.e. HSV) allow effects to be applied to it. Colorize causes the hue slider to replace instead of adjust.
Tip:The drop-down menu contains many different algorithms, not all of which require clicking to pick color(s).
Bug:There are several situations where the preview thumbnail can lock up. The only known solution is to restart the engine.- Lookup
- Loads a pre-existing lookup table.
Bug:Folder view starts in the root of the underlying game, not the current mod.- Balance - Search for tutorials
- Another tool identical to its desktop brethren. It biases color channels across bright, middling and/or dark areas of the scene.


