{"record":{"id":"57ca6f45f4c4b254","repo":"roboflow/supervision","slug":"bgr-values-must-be-in-range-0-255-got-b-g","errorCode":null,"errorMessage":"BGR values must be in range 0-255, got ({b}, {g}, {r})","messagePattern":"BGR values must be in range 0-255, got \\((.+?), (.+?), (.+?)\\)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"src/supervision/draw/color.py","lineNumber":212,"sourceCode":"                element is an integer in the range 0-255.\n\n        Returns:\n            An instance representing the color.\n\n        Raises:\n            ValueError: If any BGR value is outside the range 0-255.\n\n        Example:\n            ```pycon\n            >>> import supervision as sv\n            >>> sv.Color.from_bgr_tuple((0, 255, 255))\n            Color(r=255, g=255, b=0)\n\n            ```\n        \"\"\"\n        b, g, r = color_tuple\n        if not (0 <= r <= 255 and 0 <= g <= 255 and 0 <= b <= 255):\n            raise ValueError(f\"BGR values must be in range 0-255, got ({b}, {g}, {r})\")\n        return cls(r=r, g=g, b=b)\n\n    @classmethod\n    def from_rgba_tuple(cls, color_tuple: tuple[int, int, int, int]) -> Color:\n        \"\"\"\n        Create a Color instance from an RGBA tuple.\n\n        Args:\n            color_tuple: A tuple representing the color in RGBA format, where each\n                element is an integer in the range 0-255.\n\n        Returns:\n            An instance representing the color.\n\n        Raises:\n            ValueError: If any RGBA value is outside the range 0-255.\n\n        Example:","sourceCodeStart":194,"sourceCodeEnd":230,"githubUrl":"https://github.com/roboflow/supervision/blob/7f254d9784d4c37e0f03cd89ddee164c8db099c0/src/supervision/draw/color.py#L194-L230","documentation":"Error \"BGR values must be in range 0-255, got ({b}, {g}, {r})\" thrown in roboflow/supervision.","triggerScenarios":"Thrown at src/supervision/draw/color.py:212 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass b, g, r values each between 0 and 255 to Color.from_bgr.","Validate or clamp values before calling if they come from an external source."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7f254d9784d4c37e0f03cd89ddee164c8db099c0","analyzedAt":"2026-08-15T05:13:01.950Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}