MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / resolve_colors

Function resolve_colors

utils/theme_utils.py:60–83  ·  view source on GitHub ↗

Resolve color configuration with fallbacks to defaults. Args: title_text_color: Title text color from config title_fill_color: Title fill color from config main_text_color: Main text color from config main_text_fill_color: Main text fill color from config

(
    title_text_color: Optional[tuple],
    title_fill_color: Optional[tuple],
    main_text_color: Optional[tuple],
    main_text_fill_color: Optional[tuple]
)

Source from the content-addressed store, hash-verified

58
59
60def resolve_colors(
61 title_text_color: Optional[tuple],
62 title_fill_color: Optional[tuple],
63 main_text_color: Optional[tuple],
64 main_text_fill_color: Optional[tuple]
65) -> tuple:
66 """
67 Resolve color configuration with fallbacks to defaults.
68
69 Args:
70 title_text_color: Title text color from config
71 title_fill_color: Title fill color from config
72 main_text_color: Main text color from config
73 main_text_fill_color: Main text fill color from config
74
75 Returns:
76 Tuple of (title_text, title_fill, main_text, main_text_fill)
77 """
78 final_title_text = title_text_color if title_text_color is not None else DEFAULT_TITLE_TEXT_COLOR
79 final_title_fill = title_fill_color if title_fill_color is not None else DEFAULT_TITLE_FILL_COLOR
80 final_main_text = main_text_color
81 final_main_fill = main_text_fill_color
82
83 return final_title_text, final_title_fill, final_main_text, final_main_fill

Callers 1

new_pipeline.pyFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected