blog games developers documentation portfolio gallery

More in this category:

Colorize()

void Colorize(Color color, float amount)



Adds a color to the image.
To change an image into sepia colors, you reduce the saturation first, then add a brown/yellow color to it. The parameter amount is a value between 0 (no color added) and 1.0 (fully added color)

Example:

if(GUI.Button(new Rect(0,0,200,25), "Is it that long ago already?")) {
myTexture.Colorize( // turn image into Sepia
new Color(1f, 0.5f, 0.17f), // brownish color
0.95f // almost full effect
);
myTexture.Brightness(0.1f); // and make a little bit brighter
}








follow us