You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/functions.rst
+15
Original file line number
Diff line number
Diff line change
@@ -66,6 +66,8 @@ Yet others are handy, general-purpose utilities.
66
66
:meth:`sRGB_to_rgb` return (R, G, B) color tuple from an sRGB integer
67
67
:meth:`unicode_to_glyph_name` return glyph name from a unicode
68
68
:meth:`get_tessdata` locates the language support of the Tesseract-OCR installation
69
+
:meth:`colors_pdf_dict` return dict of color names.
70
+
:meth:`colors_wx_list` return list of color names.
69
71
:attr:`fitz_fontdescriptors` dictionary of available supplement fonts
70
72
:attr:`PYMUPDF_MESSAGE` destination of |PyMuPDF| messages.
71
73
:attr:`pdfcolor` dictionary of almost 500 RGB colors in PDF format.
@@ -874,4 +876,17 @@ Yet others are handy, general-purpose utilities.
874
876
875
877
Return the "standard" empty and invalid rectangle `Rect(2147483520.0, 2147483520.0, -2147483648.0, -2147483648.0)` resp. quad. Its top-left and bottom-right point values are reversed compared to the infinite rectangle. It will e.g. be used to indicate empty bboxes in `page.get_text("dict")` dictionaries. There are however infinitely many empty or invalid rectangles.
876
878
879
+
-----
880
+
881
+
.. method:: colors_pdf_dict()
882
+
883
+
Returns a dict mapping lower-case color name to `(red, green, blue)`
884
+
tuple, and `red`, `green`, `blue` are floats in range 0..1.
885
+
886
+
.. method:: colors_wx_list()
887
+
888
+
Returns a list of `(colorname, red, green, blue)` tuples, where
889
+
`colorname` is upper case and `red`, `green`, `blue` are integers in
0 commit comments