Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Style exports with wrong color format #656

Open
lsroka76 opened this issue Dec 4, 2024 · 4 comments
Open

Style exports with wrong color format #656

lsroka76 opened this issue Dec 4, 2024 · 4 comments
Assignees
Labels

Comments

@lsroka76
Copy link

lsroka76 commented Dec 4, 2024

When I create Style and define some colors for it they are exported in wrong format in styles.c.

@mvladic
Copy link
Contributor

mvladic commented Dec 4, 2024

Can you give me some example, i.e. what did you expect and what did you get?

@lsroka76
Copy link
Author

lsroka76 commented Dec 5, 2024

I use "Add Style", name it like "test_style", select for "Button" and then select colors for background and gradient using Color Picker.
When I check hex values for colors in EEZ Studio everything is OK but after export project to C files in styles.c there are "lv_color_hex(0xffxxxxxx)" - it looks like color is exported with alpha mask? Also RGB order looks misplaced?

I use LVGL 8.3.

@mvladic
Copy link
Contributor

mvladic commented Dec 5, 2024

... it looks like color is exported with alpha mask?

Yes, but it is ignored by the lv_color_hex function. Maybe we should omit alpha mask so instead of 0xffrrggbb just export 0xrrggbb to prevent any confusion.

Also RGB order looks misplaced?

It is not misplaced. Function lv_color_hex expects argument in the format 0x??rrggbb (where ?? is ignored) which is exactly what is generated.

@lsroka76
Copy link
Author

lsroka76 commented Dec 8, 2024

My fault - data lines for R and B were switched.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants