Added HEX↔RGBA color utilities and tests (Hacktoberfest 2025) #1988
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@Hacktoberfest
🎉 Hacktoberfest 2025 Feature Contribution — Color Utilities for Supervision
Summary
Added three new color utility functions to enhance color handling consistency, validation, and readability within the supervision library.
Added Utilities
hex_to_rgba()
→ Converts HEX color strings to RGBA tuplesrgba_to_hex()
→ Converts RGBA tuples to HEX formatis_valid_hex()
→ Validates whether a given string is a valid HEX colorAll functions are fully tested and documented to ensure reliability and reusability.
Why
This update introduces essential color utility functions that were missing in the annotation utilities.
They help in validating, converting, and managing color formats more efficiently across modules.
Improvements
Impact
Test Results
Labels
hacktoberfest
hacktoberfest-accepted
feature
enhancement
tests
open-source-contribution
Future Scope
🧭 Conclusion
This Hacktoberfest 2025 contribution introduces robust color utility functions — improving annotation consistency, color validation, and developer usability across the supervision library.
✅ Achievements
🧱 Commit Example
Lint & Format Check
Final Note
Proudly contributing to Hacktoberfest 2025
Improving color utility reliability, developer productivity, and annotation visualization quality across the Supervision ecosystem.
Hi! I’ve added color utility functions and their tests as part of Hacktoberfest 2025.
CLA is signed, and the PR is ready for review. Please approve the workflows when possible.
Thanks