Drawing - Utility¶
Contents
arcade.get_four_byte_color¶
- arcade.get_four_byte_color(color: Union[Tuple[int, int, int], List[int], Tuple[int, int, int, int]]) Union[Tuple[int, int, int, int], List[int]] [source]¶
Given a RGB list, it will return RGBA. Given a RGBA list, it will return the same RGBA.
- Parameters
color (Color) – Three or four byte tuple
- Returns
return: Four byte RGBA tuple
arcade.get_four_float_color¶
- arcade.get_four_float_color(color: Union[Tuple[int, int, int], List[int], Tuple[int, int, int, int]]) Tuple[float, float, float, float] [source]¶
Given a 3 or 4 RGB/RGBA color where each color goes 0-255, this returns a RGBA tuple where each item is a scaled float from 0 to 1.
- Parameters
color (Color) – Three or four byte tuple
- Returns
Four floats as a RGBA tuple
arcade.get_three_float_color¶
- arcade.get_three_float_color(color: Union[Tuple[int, int, int], List[int], Tuple[int, int, int, int]]) Tuple[float, float, float, float] [source]¶
Given a 3 or 4 RGB/RGBA color where each color goes 0-255, this returns a RGBA tuple where each item is a scaled float from 0 to 1.
- Parameters
color (Color) – Three or four byte tuple
- Returns
Three floats as a RGB tuple