Skip to content

Commit 72b1298

Browse files
committed
release: 2.0.2
1 parent 85e91ca commit 72b1298

File tree

17 files changed

+895
-133
lines changed

17 files changed

+895
-133
lines changed

.github/workflows/default.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Run tests
2929
run: |
3030
pip install --find-links=dist materialyoucolor
31-
python tests/test_color_gen.py test_image.jpg 1
31+
python tests/test_all.py test_image.jpg 1
3232
- name: Upload artifacts
3333
uses: actions/upload-artifact@v2
3434
with:

.github/workflows/linux.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ jobs:
3535
/opt/python/cp311-cp311/bin/pip install --find-links=dist materialyoucolor
3636
/opt/python/cp312-cp312/bin/pip install --find-links=dist materialyoucolor
3737
38-
/opt/python/cp39-cp39/bin/python tests/test_color_gen.py test_image.jpg 1
39-
/opt/python/cp310-cp310/bin/python tests/test_color_gen.py test_image.jpg 1
40-
/opt/python/cp311-cp311/bin/python tests/test_color_gen.py test_image.jpg 1
41-
/opt/python/cp312-cp312/bin/python tests/test_color_gen.py test_image.jpg 1
38+
/opt/python/cp39-cp39/bin/python tests/test_all.py test_image.jpg 1
39+
/opt/python/cp310-cp310/bin/python tests/test_all.py test_image.jpg 1
40+
/opt/python/cp311-cp311/bin/python tests/test_all.py test_image.jpg 1
41+
/opt/python/cp312-cp312/bin/python tests/test_all.py test_image.jpg 1
4242
4343
/opt/python/cp39-cp39/bin/pip install auditwheel
4444
mkdir wheelhouse

materialyoucolor/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "2.0.1"
1+
__version__ = "2.0.2"

materialyoucolor/dynamiccolor/__init__.py

Whitespace-only changes.

materialyoucolor/dynamiccolor/contrast_curve.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def __init__(self, low: float, normal: float, medium: float, high: float):
88
self.medium = medium
99
self.high = high
1010

11-
def get_contrast(self, contrast_level: float) -> float:
11+
def get(self, contrast_level: float) -> float:
1212
if contrast_level <= -1.0:
1313
return self.low
1414
elif contrast_level < 0.0:

materialyoucolor/dynamiccolor/dynamic_color.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,14 @@ def get_tone(self, scheme):
119119
n_contrast = nearer.contrast_curve.get(scheme.contrast_level)
120120
f_contrast = farther.contrast_curve.get(scheme.contrast_level)
121121

122-
n_initial_tone = nearer.get_tone(scheme)
122+
n_initial_tone = nearer.tone(scheme)
123123
n_tone = (
124124
n_initial_tone
125125
if Contrast.ratio_of_tones(bg_tone, n_initial_tone) >= n_contrast
126126
else DynamicColor.foreground_tone(bg_tone, n_contrast)
127127
)
128128

129-
f_initial_tone = farther.get_tone(scheme)
129+
f_initial_tone = farther.tone(scheme)
130130
f_tone = (
131131
f_initial_tone
132132
if Contrast.ratio_of_tones(bg_tone, f_initial_tone) >= f_contrast
@@ -166,7 +166,7 @@ def get_tone(self, scheme):
166166
return n_tone if am_nearer else f_tone
167167

168168
else:
169-
answer = self.get_tone(scheme)
169+
answer = self.tone(scheme)
170170

171171
if self.background is None:
172172
return answer

0 commit comments

Comments
 (0)