Another ILI9341 bug?
Moderator: Benj
Another ILI9341 bug?
The 'Foreground Color' property has the R and B values transposed
- Attachments
-
- ILI9341.fcfx
- (10.5 KiB) Downloaded 233 times
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
Re: Another ILI9341 bug?
Hi,
Thanks for your post.
I've had a look and cannot see a problem, perhaps I'm misunderstanding your post.
Here's the properties that I see in your project ...
I've added some additional output to your program to first display the text using the component property values.
Then there is a text output with transparency off, which demonstrates how the new background colour is drawn.
Any change to background colour is only visible on the next draw, the existing background pixels do not change until then.
Or are things different on the hardware??
Leigh
Thanks for your post.
I've had a look and cannot see a problem, perhaps I'm misunderstanding your post.
Here's the properties that I see in your project ...
I've added some additional output to your program to first display the text using the component property values.
Then there is a text output with transparency off, which demonstrates how the new background colour is drawn.
Any change to background colour is only visible on the next draw, the existing background pixels do not change until then.
Or are things different on the hardware??
Leigh
- Attachments
-
- ILI9341_LM.fcfx
- (11.44 KiB) Downloaded 222 times
Re: Another ILI9341 bug?
That is indeed the foreground color I want, but if you look at the initial component foreground property, you'll see it displays that color (C0FF00) as 00FFC0 (R & B transposed). I've attached a simpler program to demonstrate what I'm talking about. Before executing the program review the initial component properties for foreground and background colors.
- Attachments
-
- Foreground.fcfx
- (9.01 KiB) Downloaded 219 times
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
Re: Another ILI9341 bug?
Ah right.
I think you are assuming the meaning of the colour word 00FFC0.
The least significant bits represent red, not blue (i.e. BBGGRR)
If you click on that colour value and use the colour chart to pick a colour you will see the coding
edit: It did catch me out too when I first used this a few years ago, it's the way it was originally coded in V6 so we are stuck with it
I think you are assuming the meaning of the colour word 00FFC0.
The least significant bits represent red, not blue (i.e. BBGGRR)
If you click on that colour value and use the colour chart to pick a colour you will see the coding
edit: It did catch me out too when I first used this a few years ago, it's the way it was originally coded in V6 so we are stuck with it

Re: Another ILI9341 bug?
Thank you for the explanation. Albeit non-conventional, now that I'm aware of the anomaly, it's not a problem.
Now there's still the issue I'm experiencing with the background property (see separate post)
Now there's still the issue I'm experiencing with the background property (see separate post)