Make a MacOS Color palette from Python
Project description
ColorpaletteConverter
Export colorpalettes in Python to the MacOS color helper.
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.
Project details
Release history Release notifications | RSS feed
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.2.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdbe8f154e3e2788f23bbcd962ed2cf9f1dcfa741910a99ee74f9641b411e55f |
|
MD5 | 03ef7c7bc98e5a92ff2a0d0522d4d08f |
|
BLAKE2b-256 | 0936cbd59a78a8bab1d5821d07b29eb98595c716f8dfa3222047a273c5626877 |
Close
Hashes for colorpaletteconverter-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a92111a90a50c67d88ec325c56cd5cf3b5ccc0732b5b4b5b47959e2d8d0fb6e2 |
|
MD5 | a336a4d4154789e5ea055bc094b3885e |
|
BLAKE2b-256 | 337f355bfde5e75869d25c20519a647db085d51743cc48bfcd5ae635c87d4079 |