Overview
Theconstants object contains core configuration data used throughout the Pokemon Explorer application, including generation ranges, type colors, and search keyword mappings.
Generation Ranges
genRanges
Defines the Pokemon ID ranges for each generation.- Key: Generation number (string)
- Value: Array with two elements
[start, end]start(number): First Pokemon ID in the generationend(number): Last Pokemon ID in the generation
These ranges are used to filter Pokemon by generation in the search functionality.
Type Colors
typeColors
CSS gradient definitions for each Pokemon type, used for visual styling throughout the UI.- Key: Pokemon type (lowercase string)
- Value: CSS linear-gradient string with 135-degree angle
All Type Colors
All Type Colors
| Type | Gradient |
|---|---|
| Normal | #A8A878 → #C6C684 |
| Fire | #F08030 → #F5A652 |
| Water | #6890F0 → #85A8F7 |
| Electric | #F8D030 → #FAE078 |
| Grass | #78C850 → #9ADB71 |
| Ice | #98D8D8 → #BCE6E6 |
| Fighting | #C03028 → #D67873 |
| Poison | #A040A0 → #C77ABA |
| Ground | #E0C068 → #EAD69C |
| Flying | #A890F0 → #C7B2F7 |
| Psychic | #F85888 → #FA92B2 |
| Bug | #A8B820 → #C2D21E |
| Rock | #B8A038 → #D0C158 |
| Ghost | #705898 → #A292BC |
| Dragon | #7038F8 → #A27DFA |
| Dark | #705848 → #A29288 |
| Steel | #B8B8D0 → #D1D1E0 |
| Fairy | #EE99AC → #F4C2C2 |
Search Keywords
searchKeywords
Maps Spanish search terms to their English API equivalents, enabling bilingual search functionality.- Key: Spanish term (lowercase string, with and without accents)
- Value: English API term (lowercase string)
Type Keywords
Type Keywords
Color Keywords
Color Keywords
Habitat Keywords
Habitat Keywords
Size Keywords
Size Keywords
The search keywords object includes variations both with and without Spanish accents to improve search accessibility.