Skip to content

Commit 74bfe57

Browse files
committed
Add colour palletes and new devices
1 parent 5b9e267 commit 74bfe57

File tree

8 files changed

+1127
-148
lines changed

8 files changed

+1127
-148
lines changed

trmnl-ha/ha-trmnl/const.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,18 @@ export const PALETTES: Record<Palette, PaletteConfig> = {
375375
'gray-16': { label: label('gray-16'), levels: 16 },
376376
'gray-256': { label: label('gray-256'), levels: 256 },
377377
// Color palettes (labels from palette-options.ts)
378+
'color-3bwr': {
379+
label: label('color-3bwr'),
380+
colors: ['#000000', '#FF0000', '#FFFFFF'],
381+
},
382+
'color-3bwy': {
383+
label: label('color-3bwy'),
384+
colors: ['#000000', '#FFFF00', '#FFFFFF'],
385+
},
386+
'color-4bwry': {
387+
label: label('color-4bwry'),
388+
colors: ['#000000', '#FF0000', '#FFFFFF', '#FFFF00'],
389+
},
378390
'color-6a': {
379391
label: label('color-6a'),
380392
colors: ['#000000', '#FFFFFF', '#FF0000', '#00FF00', '#0000FF', '#FFFF00'],
@@ -416,6 +428,11 @@ export const PALETTES: Record<Palette, PaletteConfig> = {
416428
'#FF8C00',
417429
],
418430
},
431+
// NOTE: Full-spectrum palettes use empty color arrays — they reduce bit depth
432+
// per channel rather than mapping to discrete colors. Handled by
433+
// applyFullSpectrumProcessing() in lib/dithering.ts, not the mpr: pipeline.
434+
'color-12bit': { label: label('color-12bit'), colors: [] },
435+
'color-24bit': { label: label('color-24bit'), colors: [] },
419436
}
420437

421438
// =============================================================================

0 commit comments

Comments
 (0)