import typing as t

import numpy as np
import numpy.typing as npt

def rgb_to_hls_(r: int, g: int, b: int) -> tuple[float, float, float]: ...
def rgb_to_hsv_(r: int, g: int, b: int) -> tuple[float, float, float]: ...
def rgb_to_lab_(r: int, g: int, b: int) -> tuple[float, float, float]: ...
def rgb_to_xyz_(r: int, g: int, b: int) -> tuple[float, float, float]: ...
def hls_to_rgb_(h: float, l: float, s: float) -> tuple[int, int, int]: ...
def hsv_to_rgb_(h: float, s: float, v: float) -> tuple[int, int, int]: ...
def lab_to_rgb_(l: float, a: float, b: float) -> tuple[int, int, int]: ...
def xyz_to_rgb_(x: float, y: float, z: float) -> tuple[int, int, int]: ...
def lab_to_xyz_(l: float, a: float, b: float) -> tuple[float, float, float]: ...
def xyz_to_lab_(x: float, y: float, z: float) -> tuple[float, float, float]: ...
def ind_to_rgb_(index: int) -> tuple[int, int, int]: ...
def rgb_to_ind_(r: int, g: int, b: int) -> int: ...
@t.overload
def rgb_to_hls(r: int, g: int = ..., b: int = ...) -> tuple[float, float, float]: ...
@t.overload
def rgb_to_hls(r: tuple[int, int, int]) -> tuple[float, float, float]: ...
@t.overload
def rgb_to_hls(
    r: tuple[int, int, int], g: t.Literal[None] = ..., b: t.Literal[None] = ...
) -> tuple[float, float, float]: ...
@t.overload
def rgb_to_hls(r: npt.NDArray[np.uint8]) -> npt.NDArray[np.float_]: ...
@t.overload
def rgb_to_hls(
    r: npt.NDArray[np.uint8], g: t.Literal[None] = ..., b: t.Literal[None] = ...
) -> npt.NDArray[np.float_]: ...
@t.overload
def rgb_to_hls(
    r: npt.NDArray[np.uint8] | tuple[int, int, int] | int,
    g: None | int = ...,
    b: None | int = ...,
) -> tuple[float, float, float] | npt.NDArray[np.float_]: ...
@t.overload
def rgb_to_hsv(r: int, g: int = ..., b: int = ...) -> tuple[float, float, float]: ...
@t.overload
def rgb_to_hsv(r: tuple[int, int, int]) -> tuple[float, float, float]: ...
@t.overload
def rgb_to_hsv(
    r: tuple[int, int, int], g: t.Literal[None] = ..., b: t.Literal[None] = ...
) -> tuple[float, float, float]: ...
@t.overload
def rgb_to_hsv(r: npt.NDArray[np.uint8]) -> npt.NDArray[np.float_]: ...
@t.overload
def rgb_to_hsv(
    r: npt.NDArray[np.uint8], g: t.Literal[None] = ..., b: t.Literal[None] = ...
) -> npt.NDArray[np.float_]: ...
@t.overload
def rgb_to_hsv(
    r: npt.NDArray[np.uint8] | tuple[int, int, int] | int, g: None | int = ..., b: None | int = ...
) -> tuple[float, float, float] | npt.NDArray[np.float_]: ...
@t.overload
def rgb_to_xyz(r: int, g: int = ..., b: int = ...) -> tuple[float, float, float]: ...
@t.overload
def rgb_to_xyz(r: tuple[int, int, int]) -> tuple[float, float, float]: ...
@t.overload
def rgb_to_xyz(
    r: tuple[int, int, int], g: t.Literal[None] = ..., b: t.Literal[None] = ...
) -> tuple[float, float, float]: ...
@t.overload
def rgb_to_xyz(r: npt.NDArray[np.uint8]) -> npt.NDArray[np.float_]: ...
@t.overload
def rgb_to_xyz(
    r: npt.NDArray[np.uint8], g: t.Literal[None] = ..., b: t.Literal[None] = ...
) -> npt.NDArray[np.float_]: ...
@t.overload
def rgb_to_xyz(
    r: npt.NDArray[np.uint8] | tuple[int, int, int] | int, g: None | int = ..., b: None | int = ...
) -> tuple[float, float, float] | npt.NDArray[np.float_]: ...
@t.overload
def rgb_to_lab(r: int, g: int = ..., b: int = ...) -> tuple[float, float, float]: ...
@t.overload
def rgb_to_lab(r: tuple[int, int, int]) -> tuple[float, float, float]: ...
@t.overload
def rgb_to_lab(
    r: tuple[int, int, int], g: t.Literal[None] = ..., b: t.Literal[None] = ...
) -> tuple[float, float, float]: ...
@t.overload
def rgb_to_lab(r: npt.NDArray[np.uint8]) -> npt.NDArray[np.float_]: ...
@t.overload
def rgb_to_lab(
    r: npt.NDArray[np.uint8], g: t.Literal[None] = ..., b: t.Literal[None] = ...
) -> npt.NDArray[np.float_]: ...
@t.overload
def rgb_to_lab(
    r: npt.NDArray[np.uint8] | tuple[int, int, int] | int,
    g: None | int = ...,
    b: None | int = ...,
) -> tuple[float, float, float] | npt.NDArray[np.float_]: ...
@t.overload
def xyz_to_lab(x: float, y: float = ..., z: float = ...) -> tuple[float, float, float]: ...
@t.overload
def xyz_to_lab(x: tuple[float, float, float]) -> tuple[float, float, float]: ...
@t.overload
def xyz_to_lab(
    x: tuple[float, float, float], y: t.Literal[None] = ..., z: t.Literal[None] = ...
) -> tuple[float, float, float]: ...
@t.overload
def xyz_to_lab(x: npt.NDArray[np.float_]) -> npt.NDArray[np.float_]: ...
@t.overload
def xyz_to_lab(
    x: npt.NDArray[np.float_], y: t.Literal[None] = ..., z: t.Literal[None] = ...
) -> npt.NDArray[np.float_]: ...
@t.overload
def lab_to_xyz(l: float, a: float = ..., b: float = ...) -> tuple[float, float, float]: ...
@t.overload
def lab_to_xyz(l: tuple[float, float, float]) -> tuple[float, float, float]: ...
@t.overload
def lab_to_xyz(
    l: tuple[float, float, float], a: t.Literal[None] = ..., b: t.Literal[None] = ...
) -> tuple[float, float, float]: ...
@t.overload
def lab_to_xyz(l: npt.NDArray[np.float_]) -> npt.NDArray[np.float_]: ...
@t.overload
def lab_to_xyz(
    l: npt.NDArray[np.float_], a: t.Literal[None] = ..., b: t.Literal[None] = ...
) -> npt.NDArray[np.float_]: ...
@t.overload
def hls_to_rgb(h: float, l: float = ..., s: float = ...) -> tuple[int, int, int]: ...
@t.overload
def hls_to_rgb(h: tuple[float, float, float]) -> tuple[int, int, int]: ...
@t.overload
def hls_to_rgb(
    h: tuple[float, float, float], l: t.Literal[None] = ..., s: t.Literal[None] = ...
) -> tuple[int, int, int]: ...
@t.overload
def hls_to_rgb(h: npt.NDArray[np.float_]) -> npt.NDArray[np.uint8]: ...
@t.overload
def hls_to_rgb(
    h: npt.NDArray[np.float_], l: t.Literal[None] = ..., s: t.Literal[None] = ...
) -> npt.NDArray[np.uint8]: ...
@t.overload
def hsv_to_rgb(h: float, s: float = ..., v: float = ...) -> tuple[int, int, int]: ...
@t.overload
def hsv_to_rgb(h: tuple[float, float, float]) -> tuple[int, int, int]: ...
@t.overload
def hsv_to_rgb(
    h: tuple[float, float, float], s: t.Literal[None] = ..., v: t.Literal[None] = ...
) -> tuple[int, int, int]: ...
@t.overload
def hsv_to_rgb(h: npt.NDArray[np.float_]) -> npt.NDArray[np.uint8]: ...
@t.overload
def hsv_to_rgb(
    h: npt.NDArray[np.float_], s: t.Literal[None] = ..., v: t.Literal[None] = ...
) -> npt.NDArray[np.uint8]: ...
@t.overload
def xyz_to_rgb(x: float, y: float = ..., z: float = ...) -> tuple[int, int, int]: ...
@t.overload
def xyz_to_rgb(x: tuple[float, float, float]) -> tuple[int, int, int]: ...
@t.overload
def xyz_to_rgb(
    x: tuple[float, float, float], y: t.Literal[None] = ..., z: t.Literal[None] = ...
) -> tuple[int, int, int]: ...
@t.overload
def xyz_to_rgb(x: npt.NDArray[np.float_]) -> npt.NDArray[np.uint8]: ...
@t.overload
def xyz_to_rgb(
    x: npt.NDArray[np.float_], y: t.Literal[None] = ..., z: t.Literal[None] = ...
) -> npt.NDArray[np.uint8]: ...
@t.overload
def lab_to_rgb(l: float, a: float = ..., b: float = ...) -> tuple[int, int, int]: ...
@t.overload
def lab_to_rgb(l: tuple[float, float, float]) -> tuple[int, int, int]: ...
@t.overload
def lab_to_rgb(
    l: tuple[float, float, float], a: t.Literal[None] = ..., b: t.Literal[None] = ...
) -> tuple[int, int, int]: ...
@t.overload
def lab_to_rgb(l: npt.NDArray[np.float_]) -> npt.NDArray[np.uint8]: ...
@t.overload
def lab_to_rgb(
    l: npt.NDArray[np.float_], a: t.Literal[None] = ..., b: t.Literal[None] = ...
) -> npt.NDArray[np.uint8]: ...
@t.overload
def ind_to_rgb(index: int) -> tuple[int, int, int]: ...
@t.overload
def ind_to_rgb(index: npt.NDArray[np.uint32]) -> npt.NDArray[np.uint8]: ...
@t.overload
def rgb_to_ind(r: int, g: int = ..., b: int = ...) -> int: ...
@t.overload
def rgb_to_ind(r: tuple[int, int, int]) -> int: ...
@t.overload
def rgb_to_ind(
    r: tuple[int, int, int], g: t.Literal[None] = ..., b: t.Literal[None] = ...
) -> int: ...
@t.overload
def rgb_to_ind(r: npt.NDArray[np.uint8]) -> npt.NDArray[np.uint32]: ...
@t.overload
def rgb_to_ind(
    r: npt.NDArray[np.uint8], g: t.Literal[None] = ..., b: t.Literal[None] = ...
) -> npt.NDArray[np.uint32]: ...
@t.overload
def rgb_to_ind(
    r: npt.NDArray[np.uint8] | tuple[int, int, int] | int,
    g: tuple[int, int, int] | None | int = ...,
    b: tuple[int, int, int] | None | int = ...,
) -> int | npt.NDArray[np.uint32]: ...
