From 7137863b601ee1891a702ce3c75dc98ddbe8e89d Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Mon, 13 May 2024 16:48:25 +0200 Subject: [PATCH] add color description (#2899) --- lib/threads/catalog.py | 1 + lib/threads/palette.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/threads/catalog.py b/lib/threads/catalog.py index 9c5666681..46eb90add 100644 --- a/lib/threads/catalog.py +++ b/lib/threads/catalog.py @@ -108,6 +108,7 @@ class _ThreadCatalog(Sequence): color_block.color.name = nearest.name color_block.color.number = nearest.number color_block.color.manufacturer = nearest.manufacturer + color_block.color.description = nearest.description def get_palette_by_name(self, name): for palette in self: diff --git a/lib/threads/palette.py b/lib/threads/palette.py index e0e3a0abb..ebb6b3395 100644 --- a/lib/threads/palette.py +++ b/lib/threads/palette.py @@ -63,7 +63,7 @@ class ThreadPalette(Set): thread_name, thread_number = fields[3].strip().rsplit(" ", 1) thread_name = thread_name.strip() - thread = ThreadColor(thread_color, thread_name, thread_number, manufacturer=self.name) + thread = ThreadColor(thread_color, thread_name, thread_number, manufacturer=self.name, description=thread_name) self.threads[thread] = convert_color(sRGBColor(*thread_color, is_upscaled=True), LabColor) except (ValueError, IndexError): continue