MCPcopy Index your code
hub / github.com/pymupdf/PyMuPDF / CheckColor

Function CheckColor

src/__init__.py:22024–22032  ·  view source on GitHub ↗
(c: OptSeq)

Source from the content-addressed store, hash-verified

22022
22023
22024def CheckColor(c: OptSeq):
22025 if c:
22026 if (
22027 type(c) not in (list, tuple)
22028 or len(c) not in (1, 3, 4)
22029 or min(c) < 0
22030 or max(c) > 1
22031 ):
22032 raise ValueError("need 1, 3 or 4 color components in range 0 to 1")
22033
22034
22035def CheckFont(page: Page, fontname: str) -> tuple:

Callers 6

set_colorsMethod · 0.85
updateMethod · 0.85
set_colorsMethod · 0.85
_validateMethod · 0.85
add_redact_annotMethod · 0.85
ColorCodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…