From c521fe5a9a164a5d1bbaf15565ae4a9e266028d9 Mon Sep 17 00:00:00 2001 From: Francia Csaba Date: Wed, 21 Feb 2024 12:39:06 +0100 Subject: [PATCH] [#3] Added route_color and route_text_color to Carpool model --- amarillo/models/Carpool.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/amarillo/models/Carpool.py b/amarillo/models/Carpool.py index e0900bd..a0e1d59 100644 --- a/amarillo/models/Carpool.py +++ b/amarillo/models/Carpool.py @@ -341,7 +341,22 @@ class Carpool(BaseModel): "published.", examples=['A single date 2022-04-04 or a list of weekdays ["saturday", ' '"sunday"]']) - + route_color: Optional[str] = Field( + None, + pattern='^([0-9A-Fa-f]{6})$', + description="Route color designation that matches public facing material. " + "The color difference between route_color and route_text_color " + "should provide sufficient contrast when viewed on a black and " + "white screen.", + examples=["0039A6"]) + route_text_color: Optional[str] = Field( + None, + pattern='^([0-9A-Fa-f]{6})$', + description="Legible color to use for text drawn against a background of " + "route_color. The color difference between route_color and " + "route_text_color should provide sufficient contrast when " + "viewed on a black and white screen.", + examples=["D4D2D2"]) path: Optional[LineString] = Field( None, description="Optional route geometry as json LineString.")