Metadata-Version: 2.1
Name: colorteller
Version: 0.0.3
Summary: colorteller, benchmarking color palattes.
Home-page: https://github.com/kausalflow/colorteller-package
Author: L Ma
Author-email: hi@leima.is
License: MIT
Platform: UNKNOWN
Description-Content-Type: text/markdown
Requires-Dist: colormath (>=3.0.0)
Requires-Dist: loguru (>=0.5.3)
Requires-Dist: matplotlib (>=3.5.0)
Requires-Dist: click (>=7.0.0)
Requires-Dist: seaborn (>=0.11.2)
Provides-Extra: all
Requires-Dist: mkdocs-material (>=0.4.4) ; extra == 'all'
Requires-Dist: nose (>=1.3.7) ; extra == 'all'
Requires-Dist: mkdocs-autorefs (>=0.1.1) ; extra == 'all'
Requires-Dist: mkdocstrings (>=0.15.0) ; extra == 'all'
Provides-Extra: docs
Requires-Dist: mkdocs-material (>=0.4.4) ; extra == 'docs'
Requires-Dist: mkdocstrings (>=0.15.0) ; extra == 'docs'
Requires-Dist: mkdocs-autorefs (>=0.1.1) ; extra == 'docs'
Provides-Extra: mkdocs-autorefs
Requires-Dist: mkdocs-autorefs (>=0.1.1) ; extra == 'mkdocs-autorefs'
Provides-Extra: mkdocs-material
Requires-Dist: mkdocs-material (>=0.4.4) ; extra == 'mkdocs-material'
Provides-Extra: mkdocstrings
Requires-Dist: mkdocstrings (>=0.15.0) ; extra == 'mkdocstrings'
Provides-Extra: nose
Requires-Dist: nose (>=1.3.7) ; extra == 'nose'
Provides-Extra: tests
Requires-Dist: nose (>=1.3.7) ; extra == 'tests'

# colorteller

[![Test Code with Pip](https://github.com/kausalflow/colorteller-package/actions/workflows/tests.yaml/badge.svg?branch=main)](https://github.com/kausalflow/colorteller-package/actions/workflows/tests.yaml)

Benchmark color palettes.

`pip install colorteller`

## We have a website!

We have built a website for color palette discovery and sharing:

https://colorteller.kausalflow.com


## Documentation

Read the [Documentation](http://kausalflow.github.io/colorteller-package/).

## Use the Command Line Tool

```bash
colorteller benchmark -h "#8de4d3" -h "#344b46" -h "#74ee65" -h "#238910" -h "#a6c363" -h "#509d99" -wbc True -t test_colorteller_cmd
```

- `-h` specifies a color in hex format;
- `-t` specifies the folder to hold all the results (charts, metrics json, etc). It should be a folder.;
- `-wbc` is `True` will create benchmark metric charts;

## Use in Python Code


### Create a ColorTeller Object


```
from colorteller.teller import ColorTeller

hex_strings = ["#8de4d3", "#344b46", "#74ee65", "#238910", "#a6c363", "#509d99"]

ct = teller.ColorTeller(hex_strings=hex_strings)
```

To retrieve the properties of the color palette, please refer to [`colorteller.teller`](references/teller.md).

### Create Benchmarks

```python
from colorteller.teller import ColorTeller
from colorteller.utils import benchmark

hex_strings = ["#8de4d3", "#344b46", "#74ee65", "#238910", "#a6c363", "#509d99"]

ct = teller.ColorTeller(hex_strings=hex_strings)
c = teller.Colors(colorteller=ct)

m = c.metrics(
    methods=[
        benchmark.PerceptualDistanceBenchmark,
        benchmark.LightnessBenchmark
    ]
)
```

### Visualizations

#### Metric Visualizations

```python
from colorteller import teller
from colorteller.utils import benchmark
from colorteller.visualize import BenchmarkCharts, ApplicationCharts

hex_strings = ["#8de4d3", "#344b46", "#74ee65", "#238910", "#a6c363", "#509d99"]

ct = teller.ColorTeller(hex_strings=hex_strings)

c = teller.Colors(colorteller=ct)

m = c.metrics(
    methods=[benchmark.PerceptualDistanceBenchmark, benchmark.LightnessBenchmark]
)

charts = BenchmarkCharts(metrics=m, save_folder=".")

charts.distance_matrix(show=True)
charts.noticable_matrix(show=True)
```

#### Demo Figures Using the Color Palette

```python
from colorteller import teller
from colorteller.utils import benchmark
from colorteller.visualize import BenchmarkCharts, ApplicationCharts

hex_strings = ["#8de4d3", "#344b46", "#74ee65", "#238910", "#a6c363", "#509d99"]

ct = teller.ColorTeller(hex_strings=hex_strings)

c = teller.Colors(colorteller=ct)

ac = ApplicationCharts(colors=c, save_folder=".")

ac.charts(save_to=True)

# One could also create specific charts using the following
# ac.bar_chart(show=True)
# ac.line_chart(show=True)
# ac.scatter_chart(show=True)
# ac.donut_chart(show=True)
```

