Skip to content

Commit

Permalink
tuples arent arraylike
Browse files Browse the repository at this point in the history
  • Loading branch information
mikedh committed Jan 19, 2025
1 parent 2f30869 commit 7bb986b
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions trimesh/visual/color.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,16 @@
from .. import caching, util
from ..constants import tol
from ..grouping import unique_rows
from ..typed import ArrayLike, DTypeLike, Integer, Iterable, NDArray, Optional, Union
from ..typed import (
ArrayLike,
DTypeLike,
Integer,
Iterable,
NDArray,
Optional,
Tuple,
Union,
)
from .base import Visuals


Expand Down Expand Up @@ -562,7 +571,9 @@ def __hash__(self):
return self._colors.__hash__()


def to_rgba(colors: Optional[ArrayLike], dtype: DTypeLike = np.uint8) -> NDArray:
def to_rgba(
colors: Union[ArrayLike, None, Tuple], dtype: DTypeLike = np.uint8
) -> NDArray:
"""
Convert a single or multiple RGB colors to RGBA colors.
Expand Down

0 comments on commit 7bb986b

Please sign in to comment.