A simple package to select you favourite pokemon colors
Project description
pokepalette
A simple pokemon color chooser
This repo is based on CDWimmer/PokePalette
Install
pip install pokepalette
How to use
import numpy as np
import matplotlib.pyplot as plt
import pokepalette
There is a handy SimpleNamespace
with all the pokemons and their colours available:
pokepalette.PokemonColours.pikachu
['#f5e551',
'#f5bc1f',
'#000000',
'#9b5100',
'#dd9300',
'#613007',
'#404049',
'#282828',
'#fef5a3',
'#c41f17',
'#e55940',
'#fefefe',
'#727282']
pikachu_cmap = pokepalette.get_colormap('pikachu')
You can plot passing the pikachu
colors directly
# Pie chart, where the slices will be ordered and plotted counter-clockwise:
labels = 'Frogs', 'Hogs', 'Dogs', 'Logs'
sizes = [15, 30, 45, 10]
explode = (0, 0.1, 0, 0) # only "explode" the 2nd slice (i.e. 'Hogs')
fig1, ax1 = plt.subplots()
ax1.pie(sizes, colors=pokepalette.PokemonColours.pikachu, explode=explode, labels=labels, autopct='%1.1f%%',
shadow=True, startangle=90)
ax1.axis('equal') # Equal aspect ratio ensures that pie is drawn as a circle.
plt.show()
or passing the corresponding matplotlib's colormap
plt.rcParams["figure.figsize"] = [7.50, 3.50]
plt.rcParams["figure.autolayout"] = True
N = 50
x = np.random.randn(N)
y = np.random.randn(N)
plt.scatter(x, y, c=x, cmap=pikachu_cmap)
plt.show()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pokepalette-0.0.6.tar.gz
(39.9 kB
view hashes)
Built Distribution
Close
Hashes for pokepalette-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03b7e6ed1179397e49a71e31e307a271da65f9ebcda2272078590c5ae89ae5c2 |
|
MD5 | b4ccb1dc0d89ce3e5c0daaec70837fa8 |
|
BLAKE2b-256 | f3347c1bcae762550dadbcc65b8259caba42890766d9e08448726f6defa001d2 |