-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.py
More file actions
18 lines (13 loc) · 1.14 KB
/
Copy pathmodels.py
File metadata and controls
18 lines (13 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from pydantic import Field, BaseModel
class ColorPallet(BaseModel):
# text: str = Field(description="Color of text should contrast from background color on the page which follows the theme in hexadecimal format.")
text: str = Field(description="Color of text which follows the theme in hexadecimal format.")
background: str = Field(description="Background color of the page which follows the theme in hexadecimal format.")
primary: str = Field(description="Primary color of the page which follows the theme in hexadecimal format.")
secondary: str = Field(description="Secondary color of the page which follows the theme in hexadecimal format.")
accent: str = Field(description="Accent of the theme of the page which follows the theme in hexadecimal format.")
reason: str = Field(description="Reason for how the color pallet follows the theme")
def __str__(self):
return f"Text: {self.text}\nBackground: {self.background}\nPrimary: {self.primary}\nSecondary: {self.secondary}\nAccent: {self.accent}"
class FreeformColorPallet(BaseModel):
colors: list[str] = Field(description="colors generated which follow a theme")