monobiome 1.3.1__tar.gz → 1.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. {monobiome-1.3.1 → monobiome-1.4.0}/PKG-INFO +3 -2
  2. {monobiome-1.3.1 → monobiome-1.4.0}/README.md +1 -1
  3. {monobiome-1.3.1 → monobiome-1.4.0}/monobiome/plotting.py +28 -15
  4. {monobiome-1.3.1 → monobiome-1.4.0}/monobiome.egg-info/PKG-INFO +3 -2
  5. {monobiome-1.3.1 → monobiome-1.4.0}/monobiome.egg-info/requires.txt +1 -0
  6. {monobiome-1.3.1 → monobiome-1.4.0}/pyproject.toml +2 -1
  7. {monobiome-1.3.1 → monobiome-1.4.0}/monobiome/__init__.py +0 -0
  8. {monobiome-1.3.1 → monobiome-1.4.0}/monobiome/__main__.py +0 -0
  9. {monobiome-1.3.1 → monobiome-1.4.0}/monobiome/cli/__init__.py +0 -0
  10. {monobiome-1.3.1 → monobiome-1.4.0}/monobiome/cli/palette.py +0 -0
  11. {monobiome-1.3.1 → monobiome-1.4.0}/monobiome/cli/scheme.py +0 -0
  12. {monobiome-1.3.1 → monobiome-1.4.0}/monobiome/constants.py +0 -0
  13. {monobiome-1.3.1 → monobiome-1.4.0}/monobiome/curve.py +0 -0
  14. {monobiome-1.3.1 → monobiome-1.4.0}/monobiome/data/parameters.toml +0 -0
  15. {monobiome-1.3.1 → monobiome-1.4.0}/monobiome/palette.py +0 -0
  16. {monobiome-1.3.1 → monobiome-1.4.0}/monobiome/scheme.py +0 -0
  17. {monobiome-1.3.1 → monobiome-1.4.0}/monobiome/util.py +0 -0
  18. {monobiome-1.3.1 → monobiome-1.4.0}/monobiome.egg-info/SOURCES.txt +0 -0
  19. {monobiome-1.3.1 → monobiome-1.4.0}/monobiome.egg-info/dependency_links.txt +0 -0
  20. {monobiome-1.3.1 → monobiome-1.4.0}/monobiome.egg-info/entry_points.txt +0 -0
  21. {monobiome-1.3.1 → monobiome-1.4.0}/monobiome.egg-info/top_level.txt +0 -0
  22. {monobiome-1.3.1 → monobiome-1.4.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: monobiome
3
- Version: 1.3.1
3
+ Version: 1.4.0
4
4
  Summary: Monobiome color palette
5
5
  Project-URL: Homepage, https://doc.olog.io/monobiome
6
6
  Project-URL: Documentation, https://doc.olog.io/monobiome
@@ -17,6 +17,7 @@ Requires-Dist: nbformat>=5.10.4
17
17
  Requires-Dist: numpy>=2.3.4
18
18
  Requires-Dist: pillow>=12.0.0
19
19
  Requires-Dist: plotly>=6.3.1
20
+ Requires-Dist: pyqt5>=5.15.11
20
21
  Requires-Dist: scipy>=1.16.2
21
22
 
22
23
  # Monobiome
@@ -29,7 +30,7 @@ are designed to achieve identical contrast with the accents, and thus any one
29
30
  of the options can be selected to change the feeling of the palette without
30
31
  sacrificing readability.
31
32
 
32
- ![Theme preview](images/repo_preview_four_split.png)
33
+ ![Theme preview](images/repo_preview_primary.png)
33
34
  _(Preview of default light and dark theme variants)_
34
35
 
35
36
  See screenshots for the full set of theme variants in [THEMES](THEMES.md) (also
@@ -8,7 +8,7 @@ are designed to achieve identical contrast with the accents, and thus any one
8
8
  of the options can be selected to change the feeling of the palette without
9
9
  sacrificing readability.
10
10
 
11
- ![Theme preview](images/repo_preview_four_split.png)
11
+ ![Theme preview](images/repo_preview_primary.png)
12
12
  _(Preview of default light and dark theme variants)_
13
13
 
14
14
  See screenshots for the full set of theme variants in [THEMES](THEMES.md) (also
@@ -1,6 +1,8 @@
1
1
  import numpy as np
2
2
  import matplotlib.pyplot as plt
3
+ from coloraide import Color
3
4
 
5
+ from monobiome.palette import compute_hlc_map
4
6
  from monobiome.constants import (
5
7
  h_map,
6
8
  L_space,
@@ -52,8 +54,14 @@ def plot_hue_chroma_bounds() -> None:
52
54
  fig.subplots_adjust(top=0.9)
53
55
 
54
56
  handles, labels = axes[-1].get_legend_handles_labels()
55
- unique = dict(zip(labels, handles))
56
- fig.legend(unique.values(), unique.keys(), loc='lower center', bbox_to_anchor=(0.5, -0.06), ncol=3)
57
+ unique = dict(zip(labels, handles, strict=True))
58
+ fig.legend(
59
+ unique.values(),
60
+ unique.keys(),
61
+ loc='lower center',
62
+ bbox_to_anchor=(0.5, -0.06),
63
+ ncol=3
64
+ )
57
65
 
58
66
  plt.suptitle("$C^*$ curves for hue groups")
59
67
  plt.show()
@@ -87,11 +95,12 @@ def plot_hue_chroma_star() -> None:
87
95
  fig.show()
88
96
 
89
97
 
90
- def palette_image(palette, cell_size=40, keys=None):
91
- if keys is None:
92
- names = list(palette.keys())
93
- else:
94
- names = keys
98
+ def palette_image(
99
+ palette: dict[str, dict[int, str]],
100
+ cell_size: int = 40,
101
+ keys: list[str] | None = None
102
+ ) -> None:
103
+ names = list(palette.keys()) if keys is None else keys
95
104
 
96
105
  row_count = len(names)
97
106
  col_counts = [len(palette[n]) for n in names]
@@ -117,8 +126,14 @@ def palette_image(palette, cell_size=40, keys=None):
117
126
  return img, names, lightness_keys_per_row, cell_size, max_cols
118
127
 
119
128
 
120
- def show_palette(palette, cell_size=40, keys=None):
121
- img, names, keys, cell_size, max_cols = palette_image(palette, cell_size, keys=keys)
129
+ def show_palette(
130
+ palette: dict[str, dict[int, str]],
131
+ cell_size: int = 40,
132
+ keys: list[str] | None = None
133
+ ) -> None:
134
+ img, names, keys, cell_size, max_cols = palette_image(
135
+ palette, cell_size, keys=keys
136
+ )
122
137
 
123
138
  fig_w = img.shape[1] / 100
124
139
  fig_h = img.shape[0] / 100
@@ -130,15 +145,12 @@ def show_palette(palette, cell_size=40, keys=None):
130
145
  ytick_pos = [(i + 0.5) * cell_size for i in range(len(names))]
131
146
  ax.set_yticks(ytick_pos)
132
147
  ax.set_yticklabels(names)
133
-
134
- ax.set_ylim(img.shape[0], 0) # ensures rows render correctly without half-cells
148
+ ax.set_ylim(img.shape[0], 0) # ensures rows render w/o half-cells
135
149
 
136
150
  plt.show()
137
151
 
138
152
 
139
153
  if __name__ == "__main__":
140
- from monobiome.constants import OKLCH_hL_dict
141
-
142
154
  keys = [
143
155
  "alpine",
144
156
  "badlands",
@@ -172,5 +184,6 @@ if __name__ == "__main__":
172
184
  "blue",
173
185
  ]
174
186
 
175
- show_palette(OKLCH_hL_dict, cell_size=25, keys=keys)
176
- # show_palette(OKLCH_hL_dict, cell_size=1, keys=term_keys)
187
+ hlc_map = compute_hlc_map("oklch")
188
+ show_palette(hlc_map, cell_size=25, keys=keys)
189
+ # show_palette(hlc_map, cell_size=1, keys=term_keys)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: monobiome
3
- Version: 1.3.1
3
+ Version: 1.4.0
4
4
  Summary: Monobiome color palette
5
5
  Project-URL: Homepage, https://doc.olog.io/monobiome
6
6
  Project-URL: Documentation, https://doc.olog.io/monobiome
@@ -17,6 +17,7 @@ Requires-Dist: nbformat>=5.10.4
17
17
  Requires-Dist: numpy>=2.3.4
18
18
  Requires-Dist: pillow>=12.0.0
19
19
  Requires-Dist: plotly>=6.3.1
20
+ Requires-Dist: pyqt5>=5.15.11
20
21
  Requires-Dist: scipy>=1.16.2
21
22
 
22
23
  # Monobiome
@@ -29,7 +30,7 @@ are designed to achieve identical contrast with the accents, and thus any one
29
30
  of the options can be selected to change the feeling of the palette without
30
31
  sacrificing readability.
31
32
 
32
- ![Theme preview](images/repo_preview_four_split.png)
33
+ ![Theme preview](images/repo_preview_primary.png)
33
34
  _(Preview of default light and dark theme variants)_
34
35
 
35
36
  See screenshots for the full set of theme variants in [THEMES](THEMES.md) (also
@@ -7,4 +7,5 @@ nbformat>=5.10.4
7
7
  numpy>=2.3.4
8
8
  pillow>=12.0.0
9
9
  plotly>=6.3.1
10
+ pyqt5>=5.15.11
10
11
  scipy>=1.16.2
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "monobiome"
7
- version = "1.3.1"
7
+ version = "1.4.0"
8
8
  description = "Monobiome color palette"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.12"
@@ -18,6 +18,7 @@ dependencies = [
18
18
  "numpy>=2.3.4",
19
19
  "pillow>=12.0.0",
20
20
  "plotly>=6.3.1",
21
+ "pyqt5>=5.15.11",
21
22
  "scipy>=1.16.2",
22
23
  ]
23
24
 
File without changes
File without changes
File without changes
File without changes