Create your own pixel art maker
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pixel-art-maker/README.md

51 lines
2.6 KiB

9 years ago
# Pixel Art Maker
9 years ago
In this exercise, you'll create your own pixel art maker which will allow a user to choose colors from a palette and then draw pixel art. The interface is completely up to you, but it could look something like this.
![Example of Pixel Art Maker](pixel-art-maker-alt.png)
9 years ago
More specifically, your pixel art maker should allow a user to do the following.
9 years ago
1. Start with a blank canvas of pixels.
9 years ago
1. Select a color from a palette.
1. Paint the pixels on the canvas using the selected color.
9 years ago
1. Repeat step 2.
9 years ago
Here's a development workflow that we recommend you use.
9 years ago
1. Fork and clone this repository.
9 years ago
1. Create a small, 2x2 grid canvas made up of white, square `div` tags with a border.
1. Add an event listener to each `div` so when clicked the background turns red.
1. Create a small palette of two colors (e.g. red and blue) below the canvas using more `div` tags.
9 years ago
1. Add an event listener to these `div` tags so when clicked the current "brush" color is remembered.
9 years ago
1. Expand the dimensions of the pixel canvas.
9 years ago
1. Expand the palette with more colors. (i.e. red, orange, yellow, green, blue, purple, brown, gray, black, white, etc.)
9 years ago
1. Expand the palette with a current color indicator so the user knows which color was last selected.
9 years ago
1. Improve the look and feel of the canvas and color palette. Be careful not to break your program's behavior!
9 years ago
**TIP:** Check out [this handy tool](http://www.colors.commutercreative.com/grid/) to see a list of all the named colors in CSS.
9 years ago
### Bonus 1
9 years ago
Add a color picker which allows the user to select any color using the [`<input type="color">` tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/color) and the [`change` event](https://developer.mozilla.org/en-US/docs/Web/Events/change).
### Bonus 2
9 years ago
Add tools that augment the type of user interaction
9 years ago
- Pencil tool: Click and drag across the canvas to paint pixels.
9 years ago
- Rectangle tool: Click and drag across the canvas to paint all pixels that fall inside a rectangular selection.
9 years ago
**TIP:** Check out the [`mouseover` event](http://jsfiddle.net/ryansobol/ynctwr0m/11/).
### Deployment
9 years ago
Review the following articles on the Surge platform and then deploy your website to production.
- [Getting started with Surge](http://surge.sh/help/getting-started-with-surge)
- [Remembering a domain](http://surge.sh/help/remembering-a-domain)
A good domain name for this project is `USERNAME-pixel-art-maker.surge.sh` where `USERNAME` is your GitHub username in all **lowercase** letters. Once deployed and everything works as you expect, copy the URL to your site and paste it below.
9 years ago
PASTE YOUR PRODUCTION URL HERE