add color description (#2899)

pull/2907/head
Kaalleen 2024-05-13 16:48:25 +02:00 zatwierdzone przez GitHub
rodzic 1c524f094a
commit 7137863b60
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
2 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -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:

Wyświetl plik

@ -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