Metadata-Version: 2.1
Name: colorpaletteconverter
Version: 0.3.1
Summary: Make a MacOS Color palette from Python
Home-page: https://github.com/Rutger0000/colorpalette-converter
Author: Rutger Berns
Author-email: rutgerb0000@gmail.com
Classifier: Environment :: MacOS X
Classifier: Environment :: MacOS X :: Cocoa
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Topic :: Multimedia
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: pyobjc-core~=10.2
Requires-Dist: pyobjc-framework-Cocoa~=10.2
Provides-Extra: dev
Requires-Dist: pytest>=5.2; extra == "dev"

# ColorpaletteConverter

Export colorpalettes in Python to the MacOS color helper. 

![MacOS color helper](assets/output.png)

## Install

```
pip install colorpaletteconverter
```
Note: MacOS only
## Usage

```python
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](https://github.com/Rutger0000/colorpalette-converter/blob/master/Tutorial.ipynb).

## 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.

![Example in Apple Pages](assets/PagesViridisExample.png)

## Used packages
- [PyObjC](https://github.com/ronaldoussoren/pyobjc) 
