You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: projects/build-a-pixel-art-maker-with-html-css-and-javascript/build-a-pixel-art-maker-with-html-css-and-javascript.mdx
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Build a Pixel Art Creator with HTML, CSS, and JavaScript
2
+
title: Build a Pixel Art Maker with HTML, CSS, and JavaScript
3
3
author: Dharma Jethva
4
4
uid: HQImLPf2Tmel6kw8hCis3vcJnLo2
5
5
datePublished: 2026-03-25
@@ -23,7 +23,7 @@ tags:
23
23
24
24
Have you ever wondered what it's like to make your own pixel art like the sprites in classic video games like Super Mario and indie games like Stardew Valley? What if you could build the entire drawing tool yourself, right in the browser?
25
25
26
-
In this project tutorial, we'll build a **Pixel Art Creator**, a fully functional drawing app where you can paint pixel art on a grid canvas, pick colors, fill regions, and export your creation as a PNG image!
26
+
In this project tutorial, we'll build a **Pixel Art Maker**, a fully functional drawing app where you can paint pixel art on a grid canvas, pick colors, fill regions, and export your creation as a PNG image!
27
27
28
28
You will learn about the following concepts:
29
29
@@ -36,11 +36,11 @@ You will learn about the following concepts:
36
36
By the end of this tutorial, we'll have a fully functional pixel art editor that looks like this:
You can try the [live demo here](https://goku-kun.github.io/build-a-pixel-art-creator-with-html-css-and-javascript/completed/) to see what we're building!
43
+
You can try the [live demo here](https://goku-kun.github.io/build-a-pixel-art-maker-with-html-css-and-javascript/completed/) to see what we're building!
44
44
45
45
**Note:** This tutorial focuses on learning Canvas API fundamentals and event handling. No libraries or frameworks needed.
46
46
@@ -81,12 +81,12 @@ Now that we have a general idea of what's happening, let's get to building it!
81
81
82
82
## Setup
83
83
84
-
Download the starter code from this repository: [Pixel Art Creator Starter Code](https://github.com/Goku-kun/build-a-pixel-art-creator-with-html-css-and-javascript)
84
+
Download the starter code from this repository: [Pixel Art Maker Starter Code](https://github.com/Goku-kun/build-a-pixel-art-maker-with-html-css-and-javascript)
85
85
86
86
The folder should have the following structure:
87
87
88
88
```
89
-
pixel-art-creator-with-html-css-and-javascript/
89
+
pixel-art-maker-with-html-css-and-javascript/
90
90
├── starter/ # Start here - has TODOs to fill in
91
91
│ ├── index.html
92
92
│ ├── style.css
@@ -108,8 +108,8 @@ Let's take a look at what the starter code gives us:
108
108
Open **starter/index.html** in your browser. You should see a dark-themed layout with a toolbar on the left and an empty canvas area. Nothing is interactive yet - that's what JavaScript is for!
**Test it:** Save the file and refresh `index.html` in the browser. You should be able to click and drag on the grid to draw black pixels! You'll also see a translucent preview when hovering.
**Test it:** Draw a closed shape with the pen, select the fill tool (🪣), pick a color, and click inside the shape. The region fills without crossing the border!
-`canvas.toDataURL("image/png")` converts the canvas content into a PNG image encoded as a data URL.
500
500
- We create a temporary `<a>` element with the `download` attribute set to `"pixel-art.png"` and programmatically click it to trigger the browser's download dialog.
501
501
502
-
**Save the file** and refresh your browser. Your Pixel Art Creator should now be fully functional!
502
+
**Save the file** and refresh your browser. Your Pixel Art Maker should now be fully functional!
0 commit comments