Skip to content

Refactor color handling into a new Color type #1639

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 99 commits into from
Mar 29, 2023

Conversation

pushfoo
Copy link
Member

@pushfoo pushfoo commented Mar 15, 2023

  • 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

@pushfoo pushfoo force-pushed the color_refactor branch 3 times, most recently from 16daf0b to acd43b8 Compare March 19, 2023 08:09
@pushfoo pushfoo force-pushed the color_refactor branch 6 times, most recently from f2623cb to 8d7a49b Compare March 20, 2023 10:03
@pushfoo pushfoo marked this pull request as ready for review March 20, 2023 13:32
@pushfoo pushfoo mentioned this pull request Mar 21, 2023
4 tasks
@einarf einarf merged commit 15f6977 into pythonarcade:development Mar 29, 2023
@pushfoo pushfoo mentioned this pull request May 22, 2023
3 tasks
Sign up for free to 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