(color)
| 2353 | |
| 2354 | @staticmethod |
| 2355 | def color_text(color): |
| 2356 | if type(color) is str: |
| 2357 | return color |
| 2358 | if type(color) is int: |
| 2359 | return f"rgb({sRGB_to_rgb(color)})" |
| 2360 | if type(color) in (tuple, list): |
| 2361 | return f"rgb{tuple(color)}" |
| 2362 | return color |
| 2363 | |
| 2364 | def create_element( self, tag): |
| 2365 | return Xml( mupdf.fz_dom_create_element( self.this, tag)) |
no test coverage detected