Here’s a little icon maker class that I made when I found it near impossible to find a good method for making good icons with a modern look and gradient background. Almost everything about the icon can be edited and previewed live and can be saved to a document:
EDIT: Moved image and mesh creation to setup. (Thanks for pointing that out @Jmv38)
-- Icon Maker
-- By Mr.Ninja
-- Version 1.0
-- Make app icons at 1024 with gradient background
function setup()
parameter.color ("color1",255, 206, 0, 255)
parameter.color ("color2", 255, 96, 0, 255)
parameter.action("Save Icon", function() saveIcon() end)
parameter.number ("FontSize", 100, 1500, 1000)
parameter.number("circleRadius", 500, 1500, 900)
parameter.number("strokeW", 25, 90, 35)
parameter.text("Symbol", "+")
myIcon = image (1024,1024)
setContext(myIcon)
myMesh = mesh()
myMesh.vertices = {vec2 (0,1024), vec2(1024,0),vec2(1024,1024)}
myMeshTwo = mesh()
myMeshTwo.vertices = {vec2(0,0),vec2(1024,0),vec2(0,1024)}
end
function draw()
myMesh.colors = {color1,color2,color1}
myMeshTwo.colors = {color2,color2,color1}
setContext (myIcon)
pushMatrix()
myMesh:draw()
myMeshTwo:draw()
strokeWidth (strokeW)
stroke(255, 255, 255, 255)
fill(0, 0, 0, 0)
ellipse (512,512, circleRadius)
fill(255, 255, 255, 255)
font("GillSans-Light")
fontSize(FontSize)
text (Symbol, 512,512)
popMatrix()
setContext()
sprite(myIcon, WIDTH/2, HEIGHT/2)
translate (512,512)
myMesh:draw()
popMatrix()
setContext()
end
function saveIcon()
saveImage("Documents:Icontwo", myIcon)
print ("<<<ICON SAVED>>>")
end