Search Forum.. 

understanding colors and inverse text printing

The OLED display does not support background colors when drawing text.

I don't understand how to calculate the correct color / mode combinations to get predictable foreground / background colors.

I have been successful in drawing black text on a colored backgound, but any other combinations seem to be trial and error.

I know that the set mode operations will affect the resulting foreground color based on the operation.

What logic should we be using to calculate the foreground color when we want one specific color on another background color.

For example I would like to print blue text on a white background.  What mode should I be using and what foreground color should i use before I draw the string?

It appears that the standard setColor format of  R R R G G B B B for the bits are confusing as there appears to be only 3 states for blue, green, and red.  The LSB does not appear to have any affect

It sure would be helpful to understand how to manage colors on the OLED display.


RE:understanding colors and inverse text printing

 The 256 color pattern is mapped as: RRRGGGBB, so, if you want to draw the blue color text on a white background, you will fill up the background with white color first, then try to use AND mode and set foreground color as 00000011, or use XOR mode and set foreground color as 11111100.

Copyright Digole Digital Solutions, 2008-2022. All rights reserved.
Powered by Digole