Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
JosephBARBIERDARNAL committed Jun 2, 2024
1 parent 49fd637 commit 075be30
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,28 @@ pip install git+https://github.com/JosephBARBIERDARNAL/purrpalette.git

## Quick start

- Load the package:

```python
from purrpalette import PurrPalette
purr = PurrPalette()
```

Load a color map:
<br>

- Load a color map:

```python
cmap = purr.load_cmap('Darjeeling2', type='qualitative')
cmap = purr.load_cmap('Darjeeling2')
cmap
```

![Darjeeling2](images/Darjeeling2-qualitative.png)

<br>

- Transform a qualitative color map into a continuous one:

```python
cmap = purr.load_cmap('Darjeeling2', type='continuous')
cmap
Expand All @@ -39,7 +47,7 @@ cmap

<br>

Load a random color map:
- Load a random color map:

```python
cmap = purr.load_cmap('random')
Expand All @@ -50,18 +58,17 @@ cmap

<br>

Find where a color map comes from:
- Find where a color map comes from:

```python
purr = PurrPalette()
print(purr.source('bilbao'))
```

`'The R package: {khroma}'`

<br>

Get hex values of a color map:
- Get hex values of a color map:

```python
print(purr.hex('42e4b0'))
Expand All @@ -71,7 +78,7 @@ print(purr.hex('42e4b0'))

<br>

Get rgb values of a color map:
- Get rgb values of a color map:

```python
print(purr.rgb('AirNomads'))
Expand Down Expand Up @@ -105,4 +112,6 @@ These sites have been scraped with the scripts in `parsers/`. Data is then saved

## How to add a new palette

More is better: if you know how to add a significant amount of palettes (>30), please do so. PRs are welcome.
More is better: if you know how to add a significant amount of palettes (>30), please do so. PRs are welcome.

TODO: detail the process

0 comments on commit 075be30

Please sign in to comment.