Skip to content

Experimenting with an HSV class #3518

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 31 commits into from
Jul 25, 2024
Merged

Conversation

MrDiver
Copy link
Collaborator

@MrDiver MrDiver commented Dec 10, 2023

Attempt at finding a useful solution for different color spaces
fixes #3485

@MrDiver MrDiver added new feature Enhancement specifically adding a new feature (feature request should be used for issues instead) needs discussion Things which needs to be discussed before implemented. labels Dec 10, 2023
@behackl behackl marked this pull request as draft January 24, 2024 20:10
@MrDiver MrDiver changed the title Experimenting with an HSL class Experimenting with an HSV class Jul 24, 2024
@MrDiver MrDiver requested a review from JasonGrace2282 July 24, 2024 16:32
@MrDiver MrDiver marked this pull request as ready for review July 24, 2024 16:53
@MrDiver MrDiver requested a review from behackl July 24, 2024 16:53
@MrDiver MrDiver added this to the v0.19.0 milestone Jul 24, 2024
Copy link
Member

@JasonGrace2282 JasonGrace2282 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I'm really liking it, as well as the color conversion utilities (.into gives Rust Into::into vibes, which I love)!
I left some comments, so I would appreciate it if you could take a look.
Additionally, do you think it's a good idea to enable mypy for this file? It seems like it should be fine from my brief glance though.



def test_into_HSV() -> None:
nt.assert_equal(RED.into(HSV).into(ManimColor), RED)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is adding colors/performing other operations on colors supported? Those might also be good tests to make sure it works for both ManimColor and other color spaces (HSV).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yip, just haven't written the tests by now and still unsure of how useful it would be, but it works!

@MrDiver
Copy link
Collaborator Author

MrDiver commented Jul 25, 2024

Nice! I'm really liking it, as well as the color conversion utilities (.into gives Rust Into::into vibes, which I love)! I left some comments, so I would appreciate it if you could take a look. Additionally, do you think it's a good idea to enable mypy for this file? It seems like it should be fine from my brief glance though.

Surely, that should be fine, i had it enabled i think when writing it.

@MrDiver MrDiver force-pushed the color_experiments branch from 8cefae8 to a38cf7f Compare July 25, 2024 17:50
Copy link
Member

@JasonGrace2282 JasonGrace2282 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some more comments (mostly formatting), but other than that it looks good to me!

Copy link
Member

@JasonGrace2282 JasonGrace2282 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for sticking through my comments :)

@MrDiver MrDiver merged commit c47b2d5 into ManimCommunity:main Jul 25, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs discussion Things which needs to be discussed before implemented. new feature Enhancement specifically adding a new feature (feature request should be used for issues instead)
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Adding HSL to colors
2 participants