Comments (4)
So you're suggesting to allow either color: 0xFF0000
or hex: FF0000
as synonyms? That is doable, but would require significant extra code (needs to be done everywhere color is used), and could be confusing in my opinion, for a small gain. You can define ESPHome colors and use the ID in the lvgl config already.
from esphome.
I'd just say to allow for example just border_color: 2F8CD8
instead of border_color: 0x2F8CD8
, if it's not too difficult...
from esphome.
it is difficult, because in YAML 2F8CD8
is a string, and while that could be then converted as a hex number during validation, something like 606060
would be parsed as a decimal number by the YAML parser before it's even seen by a validator, so it would have to be written as "606060"
which defeats the purpose. And since a color ID can also be used, how do you tell if fabcde
is a hex number or an ID? So I think it's much better to have one consistent and unambigous way of specifying a color rather than shorthands that only work some of the time.
Allowing #606060
would be nice, but # is a comment indicator in YAML so that won't work.
from esphome.
Ok, forget this.
from esphome.
Related Issues (20)
- Currently active page variable or sensor HOT 5
- Lambdas for widgets states/flags HOT 1
- `lvgl.is_idle` condition, timeout required HOT 7
- LVGL sensors HOT 1
- `transform_angle`, `transform_zoom` failure
- Font kerning HOT 1
- Formatted text for widget updates HOT 1
- QR code
- Graph as image HOT 2
- VNC: host binary crashes on client disconnect
- VNC and `graphical_display_menu` don't play nicely together HOT 3
- Custom component/code integration for pages, widgets, etc. HOT 5
- Lvgl on e-paper crash (TTGO T5_V2.3_2.13) HOT 2
- Compile error in LVGL after last commit. HOT 6
- FR: `udp` sensor from multiple providers
- FR: `udp` text sensor
- FR: `udp` arbitrary data with actions and triggers
- FR: `udp` repeat messages
- Page's `skip` option to be set at runtime
- FR: `udp` multiple instances HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esphome.