taichi icon indicating copy to clipboard operation
taichi copied to clipboard

Wrong doc for rgb_to_hex

Open eisterman opened this issue 3 months ago • 0 comments

https://github.com/taichi-dev/taichi/blob/ba0e81dce559fb63a5958bf82feb1d00c55c02fe/python/taichi/ui/gui.py#L934

This function rgb_to_hex is indended to be used to convert a rgb color in the format (1.0, 1.0, 1.0) into a hex color as a int32 number.

The documentation of the function talks instead of accepting a List[int] but this is incorrect because using integers you can only have the channels value as 0 or 255 because of the moltiplication.

I think the documentation of the function needs to be corrected to List[float].

eisterman avatar Sep 19 '25 12:09 eisterman