How do I change a bitmap's color that I call from layout?

How do I change a bitmap's color that I call/display from layout?

i am trying to change the color of a bitmap during runtime that I load from layout.xml. The bitmap itself is black, however when I add:

<bitmap id="myFeetLabel" filename="footsteps.png" x="75%" y="75%">
  <palette>
    <color>AA00FF</color>
  </palette>
</bitmap>
to my layout.xml, I can change the image to purple.  How do I modify that palette in my View.mc? It seems like a waste of space to have to create 14 different layout.xml files to match each color I want to match. 
I was hoping for a simple:
myFeet = View.bitmap("myFeetLabel");
myFeet.setColor(Graphics.COLOR_BLUE);
I see references for buffered bitmaps and using dc.DrawBitmap, but frankly you all skip too much for me to figure that out with the documentation I can find.  Note: I can get the original bitmap to display using the dc functions, but I cannot change the color at all.
Is there better documentation than what they have in the Core Topics section?
(I'm starting to feel like I have a bad foot fetish, but I am simply trying to add a step icon to my step display and color code it to match.)
Thanks
  • Simple answer is that you can't do what you want.  You can have bitmaps that are the same but different cools and load the one you want.

    You can also create a custom font of your icons, and the use dc,setColor() when you display that "font",

  • Thanks for responding.  So...follow up question.  If I change my Bitmap to a drawable list, I should be able to change the color in runtime, correct? 

    I found an old post (https://forums.garmin.com/developer/connect-iq/f/discussion/2631/changing-parameters-of-shapes-defined-in-xml) where Travis recommended assigning color a variable in the layout.xml, then assigning the variable during the program.  However, I could not get it to take a variable.  The compiler requires the number or Graphics.COLOR_*** or it crashes.

    According to Core Topics, the <shape> tag, color attribute defaults to the foreground color if left unfilled.  Great!  I set up a myfeet.draw(dc) to only find the objects will not draw unless I hard code a color in the layout.xml.  Thoughts?

    file *view.mc:

    var myFeet;

    in function initialize()...

      myFeet = new Rez.Drawables.feet();

    in function onUpdate()...

    View.onUpdate(dc);
    dc.setColor(Gfx.COLOR_DK_RED, Gfx.COLOR_TRANSPARENT);
    myFeet.draw(dc);
    file feet.xml (random shapes):
    <drawable-list id="feet" background="Graphics.COLOR_TRANSPARENT">
        <shape type="circle" x="48%" y="67%" radius="4%" />
        <shape type="rectangle" x="35%" y="55%" width="30%" height="10%" />
        <shape type="polygon" points="[[35%,55%],[35%,67%],[30%,67%]]" />
    </drawable-list>
  • It's possible now with newer devices, drawBitmap2 and the tintcolor option.