-def pick_contrasting_color(name: Optional[str] = "",
- red: Optional[int] = None,
- green: Optional[int] = None,
- blue: Optional[int] = None) -> Tuple[int, int, int]:
- import string_utils
+def pick_contrasting_color(
+ name: Optional[str] = "",
+ red: Optional[int] = None,
+ green: Optional[int] = None,
+ blue: Optional[int] = None,
+) -> Tuple[int, int, int]:
+ """This method will return a red, green, blue tuple representing a
+ contrasting color given the red, green, blue of a background
+ color or a color name of the background color.
+
+ >>> pick_contrasting_color(None, 20, 20, 20)
+ (255, 255, 255)
+
+ >>> pick_contrasting_color("white")
+ (0, 0, 0)