Skip to content

Commit 27ec655

Browse files
committed
Chenged hex color handler
1 parent ec7cd47 commit 27ec655

File tree

1 file changed

+1
-2
lines changed
  • src/superannotate_schemas/schemas

1 file changed

+1
-2
lines changed

src/superannotate_schemas/schemas/base.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,5 +249,4 @@ class HexColor(BaseModel):
249249

250250
@validator("__root__")
251251
def validate_color(cls, v):
252-
color = Color(v)
253-
return color.as_hex()
252+
return '#{:02X}{:02X}{:02X}'.format(*Color(v).as_rgb_tuple())

0 commit comments

Comments
 (0)