mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-20 10:51:15 +08:00
Annotate PIL.ImageColor (#6151)
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
from typing import Any
|
||||
from typing import Tuple, Union
|
||||
|
||||
def getrgb(color): ...
|
||||
def getcolor(color, mode): ...
|
||||
_RGB = Union[Tuple[int, int, int], Tuple[int, int, int, int]]
|
||||
_Ink = Union[str, int, _RGB]
|
||||
_GreyScale = Tuple[int, int]
|
||||
|
||||
colormap: Any
|
||||
def getrgb(color: _Ink) -> _RGB: ...
|
||||
def getcolor(color: _Ink, mode: str) -> _RGB | _GreyScale: ...
|
||||
|
||||
colormap: dict[str, str]
|
||||
|
||||
@@ -3,9 +3,9 @@ from typing import Any, Sequence, Tuple, Union, overload
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .Image import Image
|
||||
from .ImageColor import _Ink
|
||||
from .ImageFont import _Font
|
||||
|
||||
_Ink = Union[str, int, Tuple[int, int, int], Tuple[int, int, int, int]]
|
||||
_XY = Sequence[Union[float, Tuple[float, float]]]
|
||||
_Outline = Any
|
||||
|
||||
|
||||
Reference in New Issue
Block a user