Acorn Documentation: Making a Custom Web Button

Making a Custom Web Button


Pasted Graphic 35.tiff



In this tutorial, you will learn how to make a custom ‘Submit’ button that is seen on a lot of websites these days. 



Break it down.


If you zoom in on the image, you'll notice that the button is made up of 4 distinct components.


There is an outside border (outer highlight), an inside border (inner highlight), and the meat of the button.  Each of these first 3 parts contains a gradient.  The gradient is not as distinct for the edges, but it's there.


The final component is a drop shadow that shows up on the outside bottom of the button.

Pasted Graphic 3.tiff




Start at the beginning.


Create a new image in Acorn.  Enter 200 x 100 pixels as the dimensions and set the background color to transparent.


Next, click on the shape tool button in the palette.  Choose the rectangle tool.  You can also use the shortcut key 'R' to select the rectangle tool.


Make sure the fill button is checked, set the corner radius to "4", and set the stroke to 0.   



Pasted Graphic 9.tiff




Make your first rounded rectangle.


With the rectangle tool selected, make a single click on your canvas.  A window will come up asking for specific dimensions of the rectangle you would like to create.  Enter 78 for the width, and 30 for the height.   Click 'OK'.  You should have a box on your canvas at this point.


Using the move tool (shortcut key 'v'), drag your new shape to the middle of the canvas.  If you have "Snap To Document Bounds" turned on, the shape should snap to the center of the canvas when you get close.

Pasted Graphic 10.tiff




Select the gradient tool.


Make sure your shape is selected, and then choose the gradient tool from the palette (shortcut key 'G').  Select the gradient highlighted on the right.

Pasted Graphic 12.tiff




Put a gradient on the shape.


If you had your shape selected, your canvas should look like the first example on the right.  


You'll notice that the gradient goes from left to right by default- but it needs to go from bottom to top.  To do this, make sure the gradient tool is still selected.  Using the mouse, drag a line from the bottom of the shape to the top of the shape while holding down the shift key.  This will re-orient the direction of the gradient from bottom to top.  Holding down the shift key places the gradient at a perfect 90 degree angle.


Your canvas should now look like the second image to the right.


This is a good time to save your image and give it a descriptive name like "Submit Button".  Be sure to save it as a .acorn file.


Pasted Graphic 14.tiff



Pasted Graphic 15.tiff 




You made the border.  But it's a box.  It's a border box!


It might not look like it just yet, but you've just created the outside border to your button.  


Select the shape using the move tool, copy it, and paste it.  The canvas should now look like the first image to the right.


The duplicate shape will become the inner highlight of the button.


Make sure the duplicate shape is still selected.  Bring up the rectangle tool palette by clicking on the rectangle shape in the palette again (or pressing the 'R' key).  You'll notice that the frame field at the bottom of the palette now has values in it.  Since the inner highlight is a bit smaller than the outside highlight, change the size of the shape.


For the width and height fields, enter 76 and 28.  Next, using the move tool, drag the duplicate shape to the center of the canvas so it's right on top of the original shape.

 

Reduce the corner radius of the duplicate shape to 3 px.




Pasted Graphic 16.tiff





Pasted Graphic 17.tiff





Time for a lighter inner gradient.


Since the inner highlight is by definition lighter than the outside, you'll need to change the values of the gradient.


If you double click on the first gradient move widget (that's the guy that looks like this on the gradient palette: Pasted Graphic 20.tiff), the color picker will come up.  Drag the brightness slider up to a point where it's approximately 25% away from the top.  If you don't see the color wheel in your color picker, make sure to select it from the toolbar at the top.


Next, double click on the second gradient widget, and slide the brightness slider all the way to the top.


The button should now look like this:


Pasted Graphic 22.tiff



Hey- you're getting there!



Pasted Graphic 21.tiff





One more gradient to go.


To make the third shape, follow the same steps as outlined for creating the second one.  Start by selecting the smaller shape, copy, and then paste it on the canvas.  Using the shape palette, set the width to 74, and the height to 26, change the corner radius to 2px.  Drag the shape to the middle of the canvas, and make sure it stays selected in order to change its gradient.


If you look back to the original image of the button, you'll notice that the big inner gradient is darker than the highlight, but lighter than the outside border.  When adjusting the final gradient, keep that in mind.


With the gradient tool selected, double click on the first gradient move widget to bring up the color palette.  Drag the brightness slider down a bit until it's about 30% from the top.  Double click on the second gradient widget, and drag it down so it is about 25% from the top.  Deselect the shape.  The canvas should now look like the image to the right.


It's looking pretty good!










Pasted Graphic 23.tiff




Making a drop shadow using a layer style.


There's one final thing missing from the 4 parts of the button, and that's the drop shadow.


Bring up the layer style window by choosing the Layer ▸ Layer Style… menu.  Select the "Drop Shadow" option from ‘Add a Filter’.


The window should change so it looks similar to the one on the right.  Change the X Offset to 0, and the Y Offset to −1.  Change the Blur Radius to 1, and then finally set the Opacity to 0.3.  Once you are done, click the OK Button.


You officially have a very stylish button.

Pasted Graphic 24.tiff




Text it up a bit.


Choose the Layer ▸ New Shape Layer menu item.  Why?  Because in order to style your text up a little bit, you need the text to be on its very own layer for it to work right.


Once you've added your new shape layer, click on the text palette (shortcut key 'T').  Change the Family to "Helvetica Neue", change the Typeface to "Bold", and set the Size to 15.


Click on the canvas with your text tool (right over the button) and type the word "Submit".  Press the ESC key to end editing, and align your text so it fits over the button.  Here's what it should look like:


Pasted Graphic 29.tiff

Pasted Graphic 27.tiff




Layer Styles, one more time.


Change the color of the text.  With your text selected, double click on the lower of the two color wells in the palette (which is probably white).   This will bring up the color picker window.  Using the color wheel, pick a dark blue that isn't too far off from the outside border color.  You can use the magnifying glass in the color picker to select that exact color.  The text will now be a little hard to read, as demonstrated:



Pasted Graphic 33.tiff



But don't worry, you're about to make it better.


Bring up the Layer Styles window again (using the Layer ▸ Layer Style… menu), and choose "Inner Shadow" from the Filter popup.  Change the X Offset to 1, Y Offset to −1, Blur Radius to 0, and set the Opacity to 0.2.  


Don't close the window just yet!  Add another Layer Style to the mix.  Using the + button in the lower left corner of the window, select "Drop Shadow" from the list that appears.


Now, this next part might seem a little counterintuitive, but you are going to change the color of the drop shadow from black to white.  Who has ever heard of a white shadow?  In the digital world anything is possible.  Click on the Shadow Color: Color Well.  In the color picker that comes up, change the color to white.  Change the X Offset to 1,  Y Offset to −1, the Blur to 0, and the Opacity to 0.4.


Click the OK button.










Pasted Graphic 32.tiff



BEHOLD!  IT IS DONE!  A BUTTON AT LAST!


Pasted Graphic 34.tiff


So, it's great and all- but you might want to go back and adjust the coloring of your text, or maybe adjust the gradients a bit.  You could even change up the color of the text back to white, remove the inner shadow, and set the drop shadow to black to make your button look like this:


Pasted Graphic 36.tiff



It's all up to you.  Hopefully you've learned something valuable today- including how to make a neat button with Acorn.


Thanks to the folks at http://kickoffapp.com/ for the inspiration.