fix color config for ts (fixes #1679)

This commit is contained in:
Blake Blackshear 2021-09-04 16:39:56 -05:00
parent f63a7cb6c0
commit 8109445fdd
2 changed files with 5 additions and 5 deletions

View File

@ -400,9 +400,9 @@ class SnapshotsConfig(BaseModel):
class ColorConfig(BaseModel):
red: int = Field(default=255, le=0, ge=255, title="Red")
green: int = Field(default=255, le=0, ge=255, title="Green")
blue: int = Field(default=255, le=0, ge=255, title="Blue")
red: int = Field(default=255, ge=0, le=255, title="Red")
green: int = Field(default=255, ge=0, le=255, title="Green")
blue: int = Field(default=255, ge=0, le=255, title="Blue")
class TimestampPositionEnum(str, Enum):

View File

@ -276,7 +276,7 @@ class TrackedObject:
self.camera_config.timestamp_style.format,
font_effect=self.camera_config.timestamp_style.effect,
font_thickness=self.camera_config.timestamp_style.thickness,
font_color=(color.red, color.green, color.blue),
font_color=(color.blue, color.green, color.red),
position=self.camera_config.timestamp_style.position,
)
@ -411,7 +411,7 @@ class CameraState:
self.camera_config.timestamp_style.format,
font_effect=self.camera_config.timestamp_style.effect,
font_thickness=self.camera_config.timestamp_style.thickness,
font_color=(color.red, color.green, color.blue),
font_color=(color.blue, color.green, color.red),
position=self.camera_config.timestamp_style.position,
)