Access Pokémon color palettes for your projects
Get a Pokémon with its color palette
Get detailed color formats for a Pokémon
Get all Pokémon type colors
Select an endpoint to see example response
// Get Pikachu's colors
fetch('/api/pokemon/25')
.then(response => response.json())
.then(data => {
// Use the color data
document.body.style.backgroundColor = data.colors.primary;
document.body.style.color = data.colors.text;
console.log(data);
});/* Add this to your CSS */
.pikachu-theme {
--primary-color: #F8D030;
--secondary-color: #A1871F;
--text-color: #000000;
background-color: var(--primary-color);
color: var(--text-color);
}
.pikachu-theme .accent {
background-color: var(--secondary-color);
}import { useState, useEffect } from 'react';
function PokemonTheme({ pokemonId, children }) {
const [colors, setColors] = useState(null);
useEffect(() => {
fetch(`/api/colors/${pokemonId}`)
.then(res => res.json())
.then(data => setColors(data))
.catch(err => console.error('Failed to load colors:', err));
}, [pokemonId]);
if (!colors) return <div>Loading theme...</div>;
return (
<div style={{
backgroundColor: colors.primary.hex,
color: colors.text.hex,
padding: '20px',
borderRadius: '8px',
boxShadow: `0 4px 6px ${colors.secondary.rgba.replace('1)', '0.3)')}`
}}>
{children}
</div>
);
}