diff --git a/Color-Corrections.md b/Color-Corrections.md index 30404ce..cd04b7c 100644 --- a/Color-Corrections.md +++ b/Color-Corrections.md @@ -1 +1,19 @@ -TODO \ No newline at end of file +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](https://en.wikipedia.org/wiki/Gamma_correction) (often configurable in games). +Applying a color-correction to a brush is straight forward and might look like this: +```C# +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. +```C# + 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](https://github.com/DarthAffe/CUE.NET/blob/master/ColorCorrection/GammaCorrection.cs#L81) for a reference on how this might look. \ No newline at end of file