Create new texture2D in runtime

hey guys,
I am using UnityPaint as foundation for a drawing app.
It uses a texture2D to paint on, but I want to…via a button… load/create a new texture and add that to the variable in the script.
Thus giving me a new canvas and another drawing (deleting/wiping pixels is a secondary option but would prefer help on makking a new ‘canvas’).
Hope it makes sense,
Krodil
ps: repost from forum. Dont know where these questions are best put.

I have a bit of code that creates a new Texture2D at runtime and sets it to a specific colour. I use it to fade in or out of a black screen at the beginning of my levels. The texture here is only 1x1 pixel but you can easily change that.

// Create the texture and set its colour.
Texture2D blackTexture = new Texture2D(1,1);
blackTexture.SetPixel(0,0,Color.black);
blackTexture.Apply();
...
// Use the texture.
GUI.DrawTexture(new Rect(0,0,Screen.width,Screen.height), blackTexture);