SIGN IN SIGN UP
roboflow / supervision UNCLAIMED

We write your reusable computer vision tools. 💜

0 0 0 Python

fix: add validation for RGB/BGR color values in Color class (#1984)

* fix: add validation for RGB/BGR color values in Color class

- Add range validation (0-255) to from_rgb_tuple() and from_bgr_tuple()
- Raise ValueError for invalid color values with descriptive messages
- Add comprehensive tests for both valid and invalid cases
- Update docstrings to document the new validation behavior

* fix(pre_commit): 🎨 auto format pre-commit hooks

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: jirka <6035284+Borda@users.noreply.github.com>
S
Shriya Sravani Yellapragada committed
cd0aac2655714b33749e0444be7ae644ea916038
Parent: 6969e7a
Committed by GitHub <noreply@github.com> on 2/4/2026, 2:20:51 PM