Skip to content
This repository has been archived by the owner on Aug 6, 2021. It is now read-only.

Color Corrections

DarthAffe edited this page Jan 8, 2017 · 4 revisions

Color-Corrections are meant to modify a color in a fixed, predefined way.

A good example and the only predefined Color-Correction in CUE.NET is the gamma correction (often configurable in games).

Applying a color-correction to a brush is straight forward and might look like this:

IColorCorrection gammaCorrection = new GammaCorrection(2);
myBrush.ColorCorrections.Add(gammaCorrection);

Implementing an own color-correction

To implement your own color-correction you just need to implement the IColorCorrection-interface which contains only the ApplyTo-method.

    public interface IColorCorrection
    {
        void ApplyTo(CorsairColor color);
    }

The ApplyTo-method contains all the logic to modify the color given as a parameter.
You can look at the gamma-correction for a reference on how this might look.

Clone this wiki locally