• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

The Coding Couple

Pair programming is a lifetime commitment.

  • Home
  • Categories
    • Arduino
    • JavaScript
    • Python
    • Raspberry Pi
  • About Us
    • Privacy Policy
  • Contact

Pokémon Color Picker | A web app built with HTML/CSS + JavaScript

May 19, 2024 by Ashley

Pokémon Color Picker powered by the PokeAPI
Pokémon Color Picker powered by the PokeAPI

In this blog post, I’m sharing details behind the creation of my latest web app: Pokémon Color Picker! Pokémon Color Picker is a simple, vanilla JS web application that retrieves data about a random Pokémon based off a user specified color.

Check out the app here!

My Motivation

I am a child of the 90s. One of the first games I owned on my red Gameboy Pocket was Pokémon Yellow. I loved that game, and my love of it led to my love of the Pokémon TV series. Now as a parent, I get to watch the joy Pokémon brings to my children.

I was recently reminded of the existence of PokéAPI. While poking around in the docs, I noticed an endpoint for retrieving Pokémon colors. Then I got to thinking it would be a neat idea to combine that endpoint with a color wheel for selecting random Pokémon based off their colors.

The main users for this application are my children. They were very intrigued with the app and love seeing what random Pokémon they’re greeted with.

The Implementation

The app was fairly simple to implement. The greatest challenge I encountered was getting the Pokémon balls to align in the order I wanted. That took a bit of tweaking. I found this post of StackOverflow on drawing elements along a circle particularly useful.

Pokémon Color Picker powered by the PokeAPI
Pokémon Color Picker powered by the PokeAPI

The Pokéballs are single div drawings. I recently created a tutorial on how to draw a Pokéball with a single div and was happy to recycle the CSS from that project.

Data Source

As I mentioned previously, this application is powered by the PokeAPI. I leverage the following endpoints from the API:

  • Pokémon Colors: GET https://pokeapi.co/api/v2/pokemon-color/{id or name}/
  • Pokémon: GET https://pokeapi.co/api/v2/pokemon/{id or name}/

Future Improvements

If I revisit the project, additional improvements or enhancements I’d like to make include:

  • Displaying the Pokémon stats
  • Improving the appearance of the app (it looks a little bland)

Lessons Learned | Final Thoughts

I enjoyed working on this little web app. It was a great chance to finally build something with the PokeAPI. I also had the opportunity to use some new CSS features including Dynamic viewport units, text-wrap: balance, and nested CSS.

I am most excited about the introduction of Dynamic viewport units. I usually set the height of the body element to 100vh. This looks great on the desktop, but when I view the website on a mobile device thanks to the navigation bar the 100vh causes scrolling. Dynamic viewport units fixes this problem.

Ashley
~ Ashley

LET’S BE FRIENDS!

  • Instagram: @thecodingcouple
  • X: @thecodingcouple
  • GitHub: @thecodingcouple
  • Other Blog Posts

Related Posts

  • Pokéball Single DIV CSS Drawing | TutorialPokéball Single DIV CSS Drawing | Tutorial
  • Trijam #261 Game Jam Diary: One Wrong MoveTrijam #261 Game Jam Diary: One Wrong Move
  • Snow Globe Single DIV CSS Drawing with Animating Snowflakes | TutorialSnow Globe Single DIV CSS Drawing with Animating Snowflakes | Tutorial
  • CSS Magic with a Single DivCSS Magic with a Single Div
  • .mjs extension (A JavaScript module file) | Today I Learned.mjs extension (A JavaScript module file) | Today I Learned
  • Getting started with Phaser and ES2015Getting started with Phaser and ES2015

Filed Under: HTML and CSS, JavaScript Tagged With: html, javascript, pokemon

Previous Post: « Pokéball Single DIV CSS Drawing | Tutorial

Primary Sidebar

Social Media

  • GitHub
  • Instagram
  • Twitter
  • YouTube

Recent Posts

  • Pokémon Color Picker | A web app built with HTML/CSS + JavaScript
  • Pokéball Single DIV CSS Drawing | Tutorial
  • Error: [🍍]: “getActivePinia()” was called but there was no active Pinia
  • Trijam #261 Game Jam Diary: One Wrong Move
  • Using WSL on Corporate VPN

Recent Comments

  • Lizzy on Creation Crate Month 2: An Arduino Powered Memory Game
  • Ashley Grenon on Creation Crate Month 2: An Arduino Powered Memory Game
  • Lizzy on Creation Crate Month 2: An Arduino Powered Memory Game
  • kelly on Creation Crate Month 2: An Arduino Powered Memory Game
  • Ashley on Creation Crate Month 3: An Arduino Powered Distance Detector

Follow us on Instagram!

This error message is only visible to WordPress admins

Error: No feed found.

Please go to the Instagram Feed settings page to create a feed.

Categories

  • Arduino
  • Conferences
  • Debugging
  • Game Jams
  • HTML and CSS
  • JavaScript
  • Programming Languages
  • Python
  • Raspberry Pi
  • Today I Learned

Archives

  • May 2024
  • April 2024
  • March 2024
  • May 2022
  • December 2021
  • May 2021
  • March 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • June 2019
  • April 2019
  • September 2017
  • April 2017
  • August 2016
  • July 2016
  • June 2016
  • May 2016
  • April 2016
  • March 2016
  • April 2015
  • January 2015

Tags

adafruit arduino brackets c# code smell codestock coding standards conventions creation crate debugging developer devspace electronics es6 es2015 game development game jam gotcha hackathon hoisting html html5 javascript led naming conventions nintendo phaser pluralsight pokemon programmer python raspberry pi retro retropie scope self improvement single div single div drawing subscription box TIL today I learned troubleshooting vue vuejs windbg

Footer

About Us

We are the Coding Couple.  Two people who met in college and decided they wanted to pair program for the rest of their ...

Read More »

Most Recent Posts

Pokémon Color Picker | A web app built with HTML/CSS + JavaScript

Pokéball Single DIV CSS Drawing | Tutorial

Error: [🍍]: “getActivePinia()” was called but there was no active Pinia

Trijam #261 Game Jam Diary: One Wrong Move

Social Media

  • GitHub
  • Instagram
  • Twitter
  • YouTube

Copyright Notice

© The Coding Couple, 2015 – 2023. Excerpts and links may be used, provided that full and clear credit is given to The Coding Couple with appropriate and specific direction to the original content.

Copyright © 2025 · Foodie Pro Theme by Shay Bocks · Built on the Genesis Framework · Powered by WordPress