Add Key Colors target type for extracting colors from screen regions
Introduce a new "key_colors" target type alongside WLED targets, enabling real-time color extraction from configurable screen rectangles with average/median/dominant modes, temporal smoothing, and WebSocket streaming. - Split WledPictureTarget into its own module, add KeyColorsPictureTarget - Add KC target lifecycle to ProcessorManager (register, start/stop, processing loop) - Extend API routes and schemas for KC targets (CRUD, settings, state, metrics, colors) - Add WebSocket endpoint for real-time color updates with auth - Add KC sub-tab in Targets UI with editor modal and live color swatches - Add EN and RU translations for all key colors strings Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -341,5 +341,40 @@
|
||||
"targets.metrics.actual_fps": "Actual FPS",
|
||||
"targets.metrics.target_fps": "Target FPS",
|
||||
"targets.metrics.frames": "Frames",
|
||||
"targets.metrics.errors": "Errors"
|
||||
"targets.metrics.errors": "Errors",
|
||||
"targets.subtab.key_colors": "Key Colors",
|
||||
"targets.section.key_colors": "🎨 Key Colors Targets",
|
||||
"kc.add": "Add Key Colors Target",
|
||||
"kc.edit": "Edit Key Colors Target",
|
||||
"kc.name": "Target Name:",
|
||||
"kc.name.placeholder": "My Key Colors Target",
|
||||
"kc.source": "Picture Source:",
|
||||
"kc.source.hint": "Which picture source to extract colors from",
|
||||
"kc.source.none": "-- No source assigned --",
|
||||
"kc.fps": "Extraction FPS:",
|
||||
"kc.fps.hint": "How many times per second to extract colors (1-60)",
|
||||
"kc.interpolation": "Color Mode:",
|
||||
"kc.interpolation.hint": "How to compute the key color from pixels in each rectangle",
|
||||
"kc.interpolation.average": "Average",
|
||||
"kc.interpolation.median": "Median",
|
||||
"kc.interpolation.dominant": "Dominant",
|
||||
"kc.smoothing": "Smoothing:",
|
||||
"kc.smoothing.hint": "Temporal blending between extractions (0=none, 1=full)",
|
||||
"kc.rectangles": "Color Rectangles",
|
||||
"kc.rectangles.hint": "Define named rectangles in relative coordinates (0.0–1.0) on the captured image",
|
||||
"kc.rect.name": "Name",
|
||||
"kc.rect.x": "X",
|
||||
"kc.rect.y": "Y",
|
||||
"kc.rect.width": "W",
|
||||
"kc.rect.height": "H",
|
||||
"kc.rect.add": "Add Rectangle",
|
||||
"kc.rect.remove": "Remove",
|
||||
"kc.rect.empty": "No rectangles defined. Add at least one rectangle to extract colors.",
|
||||
"kc.created": "Key colors target created successfully",
|
||||
"kc.updated": "Key colors target updated successfully",
|
||||
"kc.deleted": "Key colors target deleted successfully",
|
||||
"kc.delete.confirm": "Are you sure you want to delete this key colors target?",
|
||||
"kc.error.no_rectangles": "Please add at least one rectangle",
|
||||
"kc.error.required": "Please fill in all required fields",
|
||||
"kc.colors.none": "No colors extracted yet"
|
||||
}
|
||||
|
||||
@@ -341,5 +341,40 @@
|
||||
"targets.metrics.actual_fps": "Факт. FPS",
|
||||
"targets.metrics.target_fps": "Целев. FPS",
|
||||
"targets.metrics.frames": "Кадры",
|
||||
"targets.metrics.errors": "Ошибки"
|
||||
"targets.metrics.errors": "Ошибки",
|
||||
"targets.subtab.key_colors": "Ключевые Цвета",
|
||||
"targets.section.key_colors": "🎨 Цели Ключевых Цветов",
|
||||
"kc.add": "Добавить Цель Ключевых Цветов",
|
||||
"kc.edit": "Редактировать Цель Ключевых Цветов",
|
||||
"kc.name": "Имя Цели:",
|
||||
"kc.name.placeholder": "Моя Цель Ключевых Цветов",
|
||||
"kc.source": "Источник:",
|
||||
"kc.source.hint": "Из какого источника извлекать цвета",
|
||||
"kc.source.none": "-- Источник не назначен --",
|
||||
"kc.fps": "FPS Извлечения:",
|
||||
"kc.fps.hint": "Сколько раз в секунду извлекать цвета (1-60)",
|
||||
"kc.interpolation": "Режим Цвета:",
|
||||
"kc.interpolation.hint": "Как вычислять ключевой цвет из пикселей в каждом прямоугольнике",
|
||||
"kc.interpolation.average": "Среднее",
|
||||
"kc.interpolation.median": "Медиана",
|
||||
"kc.interpolation.dominant": "Доминантный",
|
||||
"kc.smoothing": "Сглаживание:",
|
||||
"kc.smoothing.hint": "Временное смешивание между извлечениями (0=нет, 1=полное)",
|
||||
"kc.rectangles": "Цветовые Прямоугольники",
|
||||
"kc.rectangles.hint": "Определите именованные прямоугольники в относительных координатах (0.0–1.0) на захваченном изображении",
|
||||
"kc.rect.name": "Имя",
|
||||
"kc.rect.x": "X",
|
||||
"kc.rect.y": "Y",
|
||||
"kc.rect.width": "Ш",
|
||||
"kc.rect.height": "В",
|
||||
"kc.rect.add": "Добавить Прямоугольник",
|
||||
"kc.rect.remove": "Удалить",
|
||||
"kc.rect.empty": "Прямоугольники не определены. Добавьте хотя бы один для извлечения цветов.",
|
||||
"kc.created": "Цель ключевых цветов успешно создана",
|
||||
"kc.updated": "Цель ключевых цветов успешно обновлена",
|
||||
"kc.deleted": "Цель ключевых цветов успешно удалена",
|
||||
"kc.delete.confirm": "Вы уверены, что хотите удалить эту цель ключевых цветов?",
|
||||
"kc.error.no_rectangles": "Пожалуйста, добавьте хотя бы один прямоугольник",
|
||||
"kc.error.required": "Пожалуйста, заполните все обязательные поля",
|
||||
"kc.colors.none": "Цвета пока не извлечены"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user