color — autopy module for working with colors¶
This module provides functions for converting between the hexadecimal format used by autopy methods and other more readable formats (e.g., RGB tuples).
Functions¶
-
autopy.color.
rgb_to_hex
(red: int, green: int, blue: int) → int¶ -
Returns hexadecimal value of given RGB tuple.
r
,g
, andb
must be in the range 0 - 255.
-
autopy.color.
hex_to_rgb
(hex: int) → Tuple[int, int, int]¶ -
Returns a tuple
(r, g, b)
of the RGB integer values equivalent to the given RGB hexadecimal value.r
,g
, andb
are in the range 0 - 255.