CodeBlanks Logo Icon CodeBlanks

Color Grading

Learn to adjust color tone with Color Grading.

What is Color Grading?

Color Grading is the group of effects that adjusts the color tone and mood of the frame. It is used to get a warm, cold or cinematic look. Settings such as brightness, contrast and saturation are done here.

renk.colorFilter.value = new Color(1f, 0.9f, 0.8f);
renk.saturation.value = 10f;

It reflects the mood of the scene through colors.

Tonemapping and LUT

Tonemapping fits the wide brightness range into the tones the screen can display. A LUT is a color transformation table; it applies ready color styles in a single step. When both are used together, the image looks balanced and stylish.

renk.tonemapping.value = Tonemapper.ACES;
renk.lut.value = lutDokusu;

Thanks to tonemapping, very bright areas do not drown in white.

Practice Set the color tone

In a class named RenkAyari, define a string ton field with the value "Normal" and an int katman field with the value 1. In the Start method, set the ton value to "Sicak", increase katman by one, and print the pieces "Ton: ", ton, " LUT katmani: " and katman joined together with Debug.Log.

Starter code

Player.cs
using UnityEngine;

public class RenkAyari : MonoBehaviour
{
    // string ton alanini "Normal" degeriyle tanimla
    // int katman alanini 1 degeriyle tanimla

    void Start()
    {
        // ton degerini "Sicak" yap
        // katman degerini bir artir
        // "Ton: " + ton + " LUT katmani: " + katman biciminde yazdir
    }
}

Sample solution

Player.cs
using UnityEngine;

public class RenkAyari : MonoBehaviour
{
    string ton = "Normal";
    int katman = 1;

    void Start()
    {
        ton = "Sicak";
        katman++;
        Debug.Log("Ton: " + ton + " LUT katmani: " + katman);
    }
}

Expected output

Ton: Sicak LUT katmani: 2

Questions and answers

Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.

1 What does Color Grading adjust?

  • The color tone and mood of the scene Correct answer
  • Shadow resolution
  • Movement speed of the objects
  • Light type

Explanation: Color Grading edits the colors and the brightness balance; it decides the overall mood of the scene.

2 Select the tonemapping

Question
    renk.____ = Tonemapper.ACES;
Answer
    renk.tonemapping = Tonemapper.ACES;

Explanation: The setting that fits the wide brightness range into screen tones is tonemapping.

3 Color Grading terms

Term Meaning
Color Grading Adjusting scene color tones
Tonemapping Fitting brightness range to screen
LUT Color transformation table
Kontrast Difference between light and dark

All lessons in Advanced