# Colorful Documentation

- Introduction & Usage
- Requirements
- Image Effects

- Analog TV
- Bleach Bypass
- Blend
- Brightness / Contrast / Gamma
- Channel Mixer
- Contrast Vignette
- Convolution Matrix 3x3
- Cross Stitch
- Double Vision
- Fast Vignette
- Frost
- Gradient Ramp
- Grayscale
- Halftone
- Hue / Saturation / Value
- Led
- Levels
- Lookup Filter
- Negative
- Photo Filter
- Pixelate
- Posterize
- Radial Blur
- RGB Split
- Sharpen
- Threshold
- Vibrance
- Vintage
- Wiggle

- Contact & Support

## Introduction & Usage

Colorful is a collection of post-processing effects and color adjustments inspired by the greatest color correction tools from the most popular graphic editing applications. If you're familiar with Photoshop, you should feel right at home !

You can apply these effects in two ways :

- Select your camera and click on one of the filters listed in Component -> Colorful.
- Select one of the components in /Colorful/Components/ and drag it onto your camera.

## Requirements

All these effects require Unity Pro and have been tested and are currently used in production on the desktop and webplayer with Unity 4.3+ (DirectX 11 compatible) and are known to work on mobile as well (iOS and Android). If for some reason you need a version compatible with Unity 3.5, please contact me.

All effects (except for three presets, see below) require a GPU with support of Shader Model 2.0 : NVIDIA cards since 2003 (GeForce FX), AMD cards since 2004 (Radeon 9500), Intel cards since 2005 (GMA 900), OpenGL ES 2.0, Xbox 360, PS3.

The Radial Blur - High Quality preset, Halftone's CMYK mode and HSV's advanced mode require Shader Model 3.0 : NVIDIA cards since 2004 (GeForce 6), AMD cards since 2005 (Radeon X1300), Intel cards since 2006 (GMA X3000), OpenGL ES 2.0, Xbox 360, PS3.

## Image Effects

### Analog TV

This effect simulates old CRT screens, with scanlines, static noise and barrel distortion.

- You can animate the noise by changing the Phase value at runtime. Auto Phase will automatically update the Phase every frame.
- Scanlines Intensity depends on Noise Intensity.
- Animate the Scanlines Offset value to scroll them updwards or downwards.
- The Scale value is useful to avoid screen streching on borders with heavy distortions.

Back to top

### Bleach Bypass

Bleach bypass, also known as skip bleach or silver retention, is an optical effect which entails either the partial or complete skipping of the bleaching function during the processing of a color film. By doing this, the silver is retained in the emulsion along with the color dyes. The result is a black and white image over a color image. The images usually would have reduced saturation and exposure latitude, along with increased contrast.

Best used with a Fast Vignette effect.

Back to top

### Blend

This effect lets you blend a texture on the screen (Texture2D, MovieTexture, or any other subclass of Texture).

The following blending modes are included :

- Darken, Multiply, Color Burn, Linear Burn, Darker Color
- Lighten, Screen, Color Dodge, Linear Dodge (Add), Lighter Color
- Overlay, Soft Light, Hard Light, Vivid Light, Linear Light, Pin Light, Hard Mix
- Difference, Exclusion, Subtract, Divide

Back to top

### Brightness / Contrast / Gamma

This effect lets you make simple adjustments to the tonal range of a rendered frame. Moving the Brightness slider to the right increases tonal values and expands highlights, to the left decreases values and expands shadows. The Contrast slider expands or shrinks the overall range of tonal values in the rendered frame. The last slider adjusts the Gamma using a simple power function.

Back to top

### Channel Mixer

The Channel Mixer options modify a targeted color channel using a mix of the existing color channels in the rendered frame. Color channels are grayscale images representing the tonal values of the color components in an rendered frame. When you use the Channel Mixer, you are adding or subtracting grayscale data from a source channel to the targeted channel. You are not adding or subtracting colors to a specific color component.

Back to top

### Contrast Vignette

Like the Fast Vignette effect, this is a very optimized vignette effect if you don't need advanced features like blurry corners & chromatic aberrations from the effect bundled with Unity. Unlike it, it lets you tweak the contrast in darken corners which results in a more photographic look.

Back to top

### Convolution Matrix 3x3

This effect studies successively every pixel of the image. For each of them, which we will call the "initial pixel", it multiplies the value of this pixel and values of the 8 surrounding pixels by the Kernel corresponsing value. Then it adds the results and the initial pixel is set to this final result value. The Divisor field can be used to normalize the kernel.

Most common usages include blur, sharpen and edge detection.

Back to top

### Cross Stitch

Applies a cross-stitching effect to the render. The pattern can be inverted and the source render pixelized to get very different effects.

Although the Size parameter works with most arbitrary numbers, for best results if should be set to a power of two.

Back to top

### Double Vision

A simple configurable diploplia effect. Exemple usage : animate the Displace vector and the Amount value to create a drunk effect.

Back to top

### Fast Vignette

A very optimized vignette effect if you don't need advanced features like blurry corners & chromatic aberrations from the effect bundled with Unity.

Back to top

### Frost

This filter adds a frosted effect to the screen.

Back to top

### Gradient Ramp

This effect maps the equivalent grayscale range of the rendered frame to the colors of a specified gradient fill. If you specify a two‑color gradient fill, for example, shadows are mapped to one of the endpoint colors of the gradient fill, highlights are mapped to the other endpoint color, and midtones are mapped to the gradations in between.

Tip: Use the /Colorful/Resources/HeatRamp.png texture to get a thermal vision effect !

#### Important Notice

This image effect expects a texture input. See /Colorful/Resources/GrayscaleRamp.png for example. To get the most out of this filter, make sure the texture is 256 pixels wide minimum.

Import settings should be set to :

- Texture Type : Advanced
- Generate Mipmaps : No
- Wrap Mode : Clamp
- Filter Mode : Bilinear
- Format : Automatic Truecolor

Back to top

### Grayscale

A configurable and blendable grayscale effect.

Back to top

### Halftone

Halftone is a technique that simulates continuous tone imagery through the use of dots, varying either in size, in shape or in spacing. It comes with black & white and color modes (cmyk color model).

Please note that the quality of this effect depends on the art style of the game, especially for the cmyk mode. It works better with low detail scenes and large gradients.

#### Important Notice

The CMYK mode requires a ShaderModel 3.0 compatible GPU.

Back to top

### Hue / Saturation / Value

This effect lets you adjust the hue, saturation, and value of a specific range of colors in the rendered frame.

The Hue slider reflects the number of degrees of rotation around the wheel from the original color of the pixel. A positive value indicates clockwise rotation; a negative value, counter-clockwise rotation. Values can range from 180 to +180.

The Saturation slider makes the color shifts away from or toward the center of the color wheel. Values can range from 100 (percentage of desaturation, duller colors) to +100 (percentage of saturation increase).

The Value slider reflects the color brightness. Values can range from -100 (dark) to +100 (bright).

This effect comes with two modes :

- Simple : the whole picture will be affected.
- Advanced : a bit slower but lets you choose to only affect a specific color range (Reds, Yellows, Greens, Cyans, Blues, Magentas). Internally these are 30° ranges with a 30° falloff on each sides to blend them nicely.

#### Important Notice

The Advanced mode requires a ShaderModel 3.0 compatible GPU.

Back to top

### Led

A more interesting version of the Pixelate effect, as seen on a LED display.

Back to top

### Levels

You use the Levels adjustment to correct the tonal range and color balance of the rendered frame by adjusting intensity levels of shadows, midtones, and highlights. The Levels histogram is a visual guide for adjusting the key tones.

The outer two input sliders map the black point and white point to the settings of the bottom sliders. By default, the bottom sliders are at level 0, where the pixels are black, and level 255, where the pixels are white. With the bottom sliders in the default positions, moving the black input slider maps the pixel value to level 0 and moving the white point slider maps the pixel value to level 255. The remaining levels are redistributed between levels 0 and 255. This redistribution increases the tonal range of the rendered frame, in effect increasing the overall contrast of the rendered frame.

The middle input field adjusts the gamma in the rendered frame. It moves the midtone (level 128) and changes the intensity values of the middle range of gray tones without dramatically altering the highlights and shadows.

The Auto B&W button automatically sets the white and black point to the lowest and highest values found in the histogram.

By default the histogram is displayed in Linear mode. You can change it by clicking the Log button.

Back to top

### Lookup Filter

Color grading can be made in a more advanced way using a LUT (lookup texture) to remap the colors in an rendered frame. Instead of having several color correction effects stacked on your camera (multiple draw calls), you can merge them all in a single lookup texture and apply it to the camera (one draw call).

What's more, it allows you to make all your color tweaking in Photoshop, Gimp, Paint.NET or any other graphics editing program and use the result in Unity very easily.

Here's an example of how you'd do that :

- Take a screenshot of your game (in play mode) and import it into your graphics editing program.
- Apply all the color adjustments your want. Remember, each pixel color must not depend on other pixels (e.g. blur or sharpen will not work).
- Once you're happy with the result, open a copy of the neutral LUT (/Colorful/Resources/LookupSource.png) in your graphic editing program.
- Perform the same adjustments steps you made on the screenshot to the LUT, or copy them, if you work in a non destructive way with adjustment layers.
- Save the LUT and assign it to the Lookup Filter component.

In Photoshop, most effect from Image -> Adjustments will work as well as all from Layer -> New Adjustment Layer.

A full guide about using this effect with Photoshop is also available here.

#### Important Notice

Import settings for the LUT should be set to :

- Texture Type : Advanced
- Bypass sRGB Sampling : Yes
- Generate Mipmaps : No
- Wrap Mode : Repeat
- Filter Mode : Bilinear
- Aniso Level : 0
- Format : Automatic Truecolor

Back to top

### Negative

A simple blendable negative effect.

Back to top

### Photo Filter

This effect mimics the technique of placing a colored filter in front of the camera lens to adjust the color balance and color temperature of the light transmitted through the lens and exposing the film.

Back to top

### Pixelate

Pixelizes the rendered frame using the given resolution scale.

Back to top

### Posterize

This effect lets you specify the number of tonal levels (or brightness values) for each channel in a rendered frame and then maps pixels to the closest matching level.

Back to top

### Radial Blur

Also known as "Zoom Blur", this effect blurs the rendered frame in the direction towards the given point (usually the center of the screen).

#### Important Notice

The High Quality preset requires a ShaderModel 3.0 compatible GPU.

Back to top

### RGB Split

This effect separates the three color channels and shift them by the requested amount in the given direction.

Back to top

### Sharpen

Sharpening enhances the definition of edges in a rendered frame.

Back to top

### Threshold

This filter converts the rendered frame to a high-contrast, black-and-white image. You can specify a certain level as a threshold. All pixels lighter than the threshold are converted to white; all pixels darker are converted to black.

Back to top

### Vibrance

This effect adjusts the saturation so that clipping is minimized as colors approach full saturation. It increases the saturation of less-saturated colors more than the colors that are already saturated. It also prevents skintones from becoming over saturated. The Advanced Mode uses a slightly different algorithm that lets you tweak the affected channels to make them more or less dominant.

Back to top

### Vintage

This effect replicates 24 of the most famous Instagram effects. All are LUT-based so they're fast, even on mobile. Note that these only do the color correction work, some of these will require the use of the Fast Vignette or Contrast Vignette effects to look exactly like they would with Instagram.

Available filters : 1977, Aden, Amaro, Brannan, Crema, Earlybird, Hefe, Hudson, Inkwell, Kelvin, LoFi, Ludwig, Mayfair, Nashville, Perpetua, Rise, Sierra, Slumber, Sutro, Toaster, Valencia, Walden, Willow, X-Pro II.

Back to top

### Wiggle

This animated effect deforms (wiggle) the screen over time. It can be used to simulate underwater effects.

Back to top

## Contact & Support

If you have any questions or feedback, you can contact me at :

- E-mail : thomas.hourdel@gmail.com
- Twitter : @Chman
- Unity Community : Chman

Quick links :

- Asset Store Page (leave a review!)
- Itch.io
- Support Forum
- Like Colorful ? Check out my other Unity Assets