Add color conversion utilities and message format example

- Add convert_and_reorder_colors() for hex to RGB conversion
- Add msg.json example with new list-based select format
- Support color order reordering based on device settings
This commit is contained in:
2026-01-27 00:42:19 +13:00
parent 1f4da28b7b
commit 4c36c7cd1c
2 changed files with 93 additions and 0 deletions

40
msg.json Normal file
View File

@@ -0,0 +1,40 @@
{
"presets": {
"test": {
"pattern": "on",
"colors": ["#FF0000", "#00FF00", "#0000FF"],
"delay": 100
},
"test2": {
"pattern": "rainbow",
"colors": ["#FF0000", "#00FF00", "#0000FF"],
"delay": 100
},
"test3": {
"pattern": "pulse",
"colors": ["#FF0000", "#00FF00", "#0000FF"],
"delay": 100
},
"test4": {
"pattern": "transition",
"colors": ["#FF0000", "#00FF00", "#0000FF"],
"delay": 100
},
"test5": {
"pattern": "chase",
"colors": ["#FF0000", "#00FF00", "#0000FF"],
"delay": 100
},
"test6": {
"pattern": "circle",
"colors": ["#FF0000", "#00FF00", "#0000FF"],
"delay": 100
}
},
"select": {
"name1": "test",
"name2": "test2",
"name3": "test3"
}
}