Hello,
with RGB565 the possible color space is limited. The green color component can change in 64 steps. The red and blue components can even change in 32 steps. The ugly gradient effect is thus inevitable with the limited number of steps. The following screenshot made with a graphic editor (e.g. Photoshop) demonstrates the problem.
In the screenshot you see a sharp color border. The both colors on the left and on the right of the border differ only in a value for the green color component. On the left the component has the value 158. On the right it is 154. In the here used graphic editior the values are expressed in the range 0 .. 255 and the difference between the values is 4. This value 4 for the green color component corresponds to the size of a single step possible for this component. (We have 64 steps * 4 = 256). The border results thus from the smallest difference between two colors:
What you can do:
- If the affected graphic is a bitmap resource, then by using an adequate graphic editor (e.g. Photoshop) you can apply additional dithering to the image. The image will then appear a little bit noisy but without the sharp borders.
- If the affected graphic is rendered dynamically by using vector graphic functionality, there is no way for further tricks. Due to performance limitations performing the dithering at the runtime when graphical shapes are drawn is not supported.
Hope it helps you further.
Best regards
Paul Banach