Making custom icon invert color when object selected

I don’t understand what the problem is. The image is inverted in the screenshot.

If the screenshot is supposed to show the desired behavior (and not what is actually happening), then I think what is happening is that LittlevGL can’t invert images when they are used as icons in the list.

I would suggest using a font instead. For example, you could use this icon from FontAwesome.