Hi Måns,
evaluating the styles and accessing the constants would be possible. If you want to follow this approach, just implement the desired operation in Chora and analyze the resulting C code. Then you can copy and reuse the code.
Nevertheless, I would recommend other approach:
1. Let the EwLoadExternBitmap() function create an ALPHA8 bitmap (see also Bitmap Color format EW_PIXEL_FORMAT_ALPHA8). It means a bitmap with opacity information only (no color information). In such bitmap, the opaque parts of the QR code could have the opacity 255, the transparent parts the opacity 0.
See also the section Access Intrinsics implemented in foreign Modules. It demonstrates the integration of a QR code encoder. When you download the example project found at the end of this section, you will find in one of its sub-folders a file named main.c. This file implements EwLoadExternBitmap() to create a QR ALPHA8 bitmap using the QR-code generator library.
2. In your Embedded Wizard project, when the bitmap is displayed in an Image view, you can configure which color should be used for the opaque areas. See the property Color of the Image view.
3. Add a Filled Rectangle view to the component containing the Image view where the QR bitmap is shown. Arrange the rectangle view behind the Image view and its size to correspond to the size of the QR bitmap.
4. Configure the color of the Filled rectangle view.
The color of the opaque areas of the QR code is determined by the Image view. The color of the transparent areas is determined by the filled rectangle. The colors can be changed at the runtime and if desired can depend on the light/dark theme.
I hope the idea helps you further.
Best regards
Paul Banach