pyboxbuilder.lid.color_layers.resolve_colors¶
-
pyboxbuilder.lid.color_layers.resolve_colors(body_color: Color, text_color: Color | None =
None, frame_color: Color | None =None, pattern_color: Color | None =None) ColorLayerAssignment[source]¶ Resolve accent colors with sensible defaults (FR-022).
The defaults are fixed rather than derived from the body, because what a label has to do is be read, and a hue shifted off the box’s own colour is no more legible against it than the colour it came from.
- Parameters:¶
- body_color: Color¶
The base box body color.
- text_color: Color | None =
None¶ Label text color. Defaults to
TEXT_COLOR.- frame_color: Color | None =
None¶ The striped grid’s top layer. Defaults to
STRIPED_GRID_COLOR.- pattern_color: Color | None =
None¶ Pattern top layer color. Defaults to a contrasting hue.
- Returns:¶
ColorLayerAssignment with all colors resolved.