Make a MacOS Color palette from Python
Project description
ColorpaletteConverter
Export colorpalettes in Python to the MacOS color helper.
Install
pip install colorpaletteconverter
Note: MacOS only
Usage
import colorpaletteconverter as cv
# Create the palette, named "MyPythonPalette"
mypalette = cv.Palette("MyPythonPalette")
# Add a color using a key e.g. "White" and color described by (r, g, b, a)
mypalette.add_color((1,1,1,1), "White")
mypalette.add_color((1,0,0,1), "Red")
mypalette.add_color((0,1,0,1), "Green")
mypalette.add_color((0,0,1,1), "Blue")
mypalette.add_color((0,0,1,0.5), "Translucent blue")
# Save it to the default location. This will make it visible in the MacOS color palette.
mypalette.save()
# To save it to an alternative location
mypalette.save("mypalette.clr")
More examples in the tutorial notebook.
Use cases
This package helps to convert color palettes from for example Matplotlib or Seaborn, or your custom generated color palettes to the MacOS Color helper.
- Matplotlib color palettes: https://matplotlib.org/stable/tutorials/colors/colormaps.html
- Seaborn color palettes: https://seaborn.pydata.org/tutorial/color_palettes.html
The colors can be used in application like Apple Pages, Apple Keynote, Apple Numbers, Apple Final Cut Pro X, Microsoft Word, Microsoft Powerpoint and more.
Used packages
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
Built Distribution
Close
Hashes for colorpaletteconverter-0.3.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7c34bca2617bd0a4af7bf3c123a64036eb5d7d010d2aee4b5acf49e9ebfecf2 |
|
MD5 | 269fa2fbd67683de75cd08e626fd5a96 |
|
BLAKE2b-256 | a0dd8ce4b92297549c3a7f6a75fb263565014acfc07b6ae2a147b3c43e482b08 |
Close
Hashes for colorpaletteconverter-0.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d81ad73803c7246e422d5f86a8202fbdf5d3d1eeca640caa108a4860fb11015d |
|
MD5 | c4396671e6059497b86dff225255dbac |
|
BLAKE2b-256 | 69865cdeb24d178a7e592ca9b42f13ebf6bf19a5179ce265a1f27087b76cf5f7 |