From: Melissa LeBlanc-Williams Date: Thu, 2 Dec 2021 16:23:43 +0000 (-0800) Subject: Merge pull request #73 from FoamyGuy/palette_items X-Git-Tag: 0.8.0~1 X-Git-Url: https://git.ayoreis.com/hackapet/Adafruit_Blinka_Displayio.git/commitdiff_plain/3e71b56944b2f39930bd2d50a387042a6c6d6fcc?hp=ac309ee7e350e30cdbab4e1f508a2551423077bb Merge pull request #73 from FoamyGuy/palette_items return rgba888 value from palette getitem --- diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ac6673b..46cefce 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,10 +19,10 @@ jobs: id: repo-name run: | echo ::set-output name=repo-name::Adafruit-Blinka-displayio - - name: Set up Python 3.6 + - name: Set up Python 3.7 uses: actions/setup-python@v1 with: - python-version: 3.6 + python-version: 3.7 - name: Versions run: | python3 --version diff --git a/displayio/palette.py b/displayio/palette.py index 77e78a5..cda3b70 100644 --- a/displayio/palette.py +++ b/displayio/palette.py @@ -82,7 +82,7 @@ class Palette: def __getitem__(self, index): if not 0 <= index < len(self._colors): raise ValueError("Palette index out of range") - return self._colors[index] + return self._colors[index]["rgb888"] def make_transparent(self, palette_index): """Set the palette index to be a transparent color""" diff --git a/displayio/tilegrid.py b/displayio/tilegrid.py index 8532ac5..e2a4653 100644 --- a/displayio/tilegrid.py +++ b/displayio/tilegrid.py @@ -179,7 +179,7 @@ class TileGrid: def _shade(self, pixel_value): if isinstance(self._pixel_shader, Palette): - return self._pixel_shader[pixel_value]["rgba"] + return self._pixel_shader[pixel_value] if isinstance(self._pixel_shader, ColorConverter): return self._pixel_shader.convert(pixel_value) return pixel_value diff --git a/docs/conf.py b/docs/conf.py index 02e8c13..44577df 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -28,7 +28,7 @@ extensions = [ # autodoc_mock_imports = ["digitalio", "busio"] intersphinx_mapping = { - "python": ("https://docs.python.org/3.4", None), + "python": ("https://docs.python.org/3.7", None), "CircuitPython": ("https://circuitpython.readthedocs.io/en/latest/", None), } diff --git a/setup.py b/setup.py index 88d1a43..5e2a025 100644 --- a/setup.py +++ b/setup.py @@ -49,8 +49,7 @@ setup( "Topic :: System :: Hardware", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.7", ], # What does your project relate to? keywords="adafruit blinka circuitpython micropython displayio lcd tft display pitft",