Skip to content

Refactor color handling into a new Color type - #1639

Merged
einarf merged 99 commits into
pythonarcade:developmentfrom
pushfoo:color_refactor
Mar 29, 2023
Merged

Refactor color handling into a new Color type#1639
einarf merged 99 commits into
pythonarcade:developmentfrom
pushfoo:color_refactor

Conversation

@pushfoo

@pushfoopushfoo commented Mar 15, 2023

Copy link
Copy Markdown
Member
  • Add backwards-compatible Color tuple subclass
  • Convert arcade.color and arcade.csscolor modules to use the new type
  • Port float normalization behavior to a property & deleted redundant get_three_three_float_color function
  • Port creation from uint24 values to a class method
  • Port creation from uint32 values to a class method
  • Port creation from normalized floats to a class method
  • Port creation from hex strings to a class method
  • Consolidate typing around the code base
  • Replace get_four_byte_color with Color.from_iterable
    • arcade.draw_commands
    • arcade.perf_graph
    • arcade.shape_list
    • arcade.text
    • arcade.examples
    • arcade.gui.widgets
    • arcade.sprite
    • doc/tutorials
    • tests/
  • Fix any lingering linting issues

Comment threadarcade/types.py Outdated
@pushfoo
pushfooforce-pushed the color_refactor branch 3 times, most recently from 16daf0b to acd43b8CompareMarch 19, 2023 08:09
@pushfoo
pushfooforce-pushed the color_refactor branch 6 times, most recently from f2623cb to 8d7a49bCompareMarch 20, 2023 10:03
@pushfoo
pushfoo marked this pull request as ready for review March 20, 2023 13:32
@pushfoopushfoo mentioned this pull request Mar 21, 2023
4 tasks
Comment threadarcade/experimental/lights.py
Comment threadarcade/experimental/lights.py
@einarf
einarf merged commit 15f6977 into pythonarcade:developmentMar 29, 2023
@pushfoopushfoo mentioned this pull request May 22, 2023
3 tasks
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@pushfoo@einarf@Ibrahim2750mi