Skip to content

Commit 2e53016

Browse files
committed
release: 2.0.1
1 parent 05fabe8 commit 2e53016

File tree

6 files changed

+11
-8
lines changed

6 files changed

+11
-8
lines changed

.github/workflows/default.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ${{ matrix.os }}
1010
strategy:
1111
matrix:
12-
os: [windows-latest, macos-latest]
12+
os: [windows-latest, macos-latest, macos-latest]
1313
python-version: ['3.9', '3.10', '3.11', '3.12']
1414
dist: [bdist_wheel]
1515
steps:

.github/workflows/linux.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
/opt/python/cp39-cp39/bin/python setup.py bdist_wheel
2828
/opt/python/cp310-cp310/bin/python setup.py bdist_wheel
2929
/opt/python/cp311-cp311/bin/python setup.py bdist_wheel
30-
/opt/python/cp312-cp312/bin/python setup.py bdist_wheel
30+
/opt/python/cp312-cp312/bin/python setup.py sdist bdist_wheel
3131
- name: Run tests
3232
run: |
3333
/opt/python/cp39-cp39/bin/pip install --find-links=dist materialyoucolor
@@ -41,6 +41,7 @@ jobs:
4141
/opt/python/cp312-cp312/bin/python tests/test_color_gen.py test_image.jpg 1
4242
4343
/opt/python/cp39-cp39/bin/pip install auditwheel
44+
mp dist/*.tar.gz wheelhouse/
4445
auditwheel repair dist/*
4546
- name: Publish to PyPI
4647
uses: pypa/gh-action-pypi-publish@v1.5.0

materialyoucolor/__init__.py

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

materialyoucolor/scheme/scheme.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ def light_from_core_palette(core: CorePalette):
3939
"onError": core.error.tone(100),
4040
"errorContainer": core.error.tone(90),
4141
"onErrorContainer": core.error.tone(10),
42-
"background": core.n1.tone(99),
42+
"background": core.n1.tone(98), # Original was 99, but that didn't worked in light shades of yellow like: [4294309340, 4294638290, 4294967264]
4343
"onBackground": core.n1.tone(10),
44-
"surface": core.n1.tone(99),
44+
"surface": core.n1.tone(98), # Here also same
4545
"onSurface": core.n1.tone(10),
4646
"surfaceVariant": core.n2.tone(90),
4747
"onSurfaceVariant": core.n2.tone(30),

materialyoucolor/utils/theme_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ def custom_color(custom_color, source_color=None, blend=False):
4646
}
4747

4848

49-
def theme_from_source_color(source: int, custom_colors: list[int]) -> Theme:
50-
palette = CorePalette.of(source)
49+
def theme_from_source_color(source: int, custom_colors = [], fix_if_disliked=False) -> Theme:
50+
palette = CorePalette.of(DislikeAnalyzer.fix_if_disliked(Hct.from_int(source)).to_int() if fix_if_disliked else source)
5151
return Theme(
5252
source,
5353
{"light": Scheme.light(source), "dark": Scheme.dark(source)},

tests/test_color_gen.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
with open(sys.argv[1], "wb") as file:
1919
file.write(
2020
requests.get(
21-
"https://unsplash.com/photos/zFMbpChjZGg/download?ixid=M3wxMjA3fDB8MXxhbGx8OHx8fHx8fDJ8fDE3MDUxMjU2NDh8&force=true").content)
21+
"https://upload.wikimedia.org/wikipedia/commons/thumb/1/19/"
22+
"Lisse%2C_Netherlands_-_panoramio_%2844%29.jpg/1280px-Lisse%2C_Netherlands_-_panoramio_%2844%29.jpg"
23+
).content)
2224
print("Downloaded!")
2325

2426
console = Console()

0 commit comments

Comments
 (0)