[go: nahoru, domu]

Skip to content
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

feat(color.py): ✨ add color constants/properties #756

Merged
merged 3 commits into from
Jan 19, 2024

Conversation

onuralpszr
Copy link
Collaborator
@onuralpszr onuralpszr commented Jan 18, 2024

Description

This commit adds the WHITE, BLACK, RED, GREEN, and BLUE color constants to the Color class in color.py. These constants represent the corresponding colors in the RGB color space. (Fix: #753)

List any dependencies that are required for this change.

Type of change

Please delete options that are not relevant.

  • Update existing feature (breaking change which adds functionality)

@onuralpszr onuralpszr self-assigned this Jan 18, 2024
@onuralpszr onuralpszr added api:utilities python Pull requests that update Python code Q1.2024 Tasks planned for execution in Q1 2024. labels Jan 18, 2024
This commit adds the WHITE, BLACK, RED, GREEN, and BLUE color constants
to the Color class in color.py. These constants represent
the corresponding colors in the RGB color space.

Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
@onuralpszr onuralpszr changed the title feat(color.py): ✨ add color constants feat(color.py): ✨ add color constants/properties Jan 18, 2024
supervision/draw/color.py Show resolved Hide resolved
supervision/draw/color.py Show resolved Hide resolved
onuralpszr and others added 2 commits January 19, 2024 01:41
Deprecated the `white`, `black`, `red`, `green`, and `blue` methods in
the `Color` class.
Users should now use the `WHITE`, `BLACK`, `RED`, `GREEN`, and `BLUE`
properties instead. This change improves the API and makes it more consistent.

Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
@onuralpszr
Copy link
Collaborator Author

@SkalskiP changes are done.

@SkalskiP
Copy link
Collaborator

Awesome! Thank you!

@SkalskiP SkalskiP merged commit 4e4fad9 into develop Jan 19, 2024
8 checks passed
@onuralpszr onuralpszr added the version: 0.18.0 Feature to be added in `0.18.0` release label Jan 19, 2024
@onuralpszr onuralpszr added this to the version: 0.18.0 milestone Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api:utilities python Pull requests that update Python code Q1.2024 Tasks planned for execution in Q1 2024. version: 0.18.0 Feature to be added in `0.18.0` release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace Color.red() with Color.RED
2 participants