FIT recording - how to get color?

I've got a few FIT recordings made, but all of them turn out black on garmin connect... anything obvious I'm not seeing???

this is how my fitcontributions.xml looks like:
<resources>
<strings>
<string id="fat_label">Fat Burned</string>
<string id="fat_graph_label">Fat Burned</string>
<string id="fat_units">g</string>
<string id="carbs_label">Carbs Burned</string>
<string id="carbs_graph_label">Carbs Burned</string>
<string id="carbs_units">g</string>
</strings>
<fitContributions>
<fitField id="0" displayInChart="true"
sortOrder = "0"
precision="2"
chartTitle="@Strings.fat_label"
dataLabel="@Strings.fat_graph_label"
unitLabel="@Strings.fat_units"
fillColor="#FF0000" />

<fitField id="1" displayInChart="true"
sortOrder = "1"
precision="2"
chartTitle="@Strings.carbs_label"
dataLabel="@Strings.carbs_graph_label"
unitLabel="@Strings.carbs_units"
fillColor="#00FF00" />
</fitContributions>
</resources>


and looks like:
  • This is one of those very old issues related to garmin connect for which never have been any feedback.
    Ciq team opened a ticket, but thats all.

    EDIT Btw, alphamonkey wrote a guest article in this blog,
    https://www.programmableweb.com/news/how-to-develop-application-metrics-garmin-connect-iq/sponsored-content/2016/11/07

    I posted the same question there , but it was never answered

    EDIT2 this is the right link, actually
    https://www.programmableweb.com/news/how-to-record-application-metrics-garmin-connect-iq/sponsored-content/2016/11/14
  • Have you tried without the # symbol? I don't currently have anything using the FitContributor module, but some of the docs seem to suggest that is how to do it.

    I know it is possible because the Stryd data field has done it without difficulty.
  • I just tried, but it remains black...
  • I use the "#000000" format in my file. The Garmin Connect website works but not Connect Mobile. I believe this falls under the laundry list of Connect problems related to the FIT contributor implementation.
  • I just tried, but it remains black...


    i have just realized, that if one opens the source code of an activity in garmin connect, colors are not specified #RRGGBB but #RGB, for instance:

    .connect-container a.activity-tracking-disclaimer {
    background-color: #fff;
    color: #222;
    margin-right: 10px;
    }


    it might be worth to try this in ConnectIQ.

    for instance choose some web safe color from this table:

    https://en.wikipedia.org/wiki/Web_colors#Web-safe_colors

    i won't be able to test in the next few days.
  • I've contacted Angus (author of the Stryd field), we've sent a few mails back and forth and Angus found the issue...

    Hi Peter,

    This is interesting.

    The RGBA values in your fit_contributor files are: rgba(104, 58, 120, 1,0)

    The RGBA values in my fit_contributor files are: rgba(223, 123, 11, 1.0)

    Notice that the alpha part of RGBA is 1,0 instead of 1.0. I believe this is causing the problem.

    See if you can roll back to an older SDK and see if the RGBA values come out in decimals instead of the comma format. Garmin team will probably have to fix this.

    Best,
    Angus


    Yup. This is it. The errant RGBA value is being fed directly into the graph. If there are five parameters to RGBA, it breaks. If there are four parameters, it works fine.


    I've verified that this is indeed the issue, after modifying the 1,0 by 1.0 in the iq file the graph displays fine:


    @Connect IQ Team: can you move this thread to the bug reports forum and create a ticket to not use 1,0 but 1.0 inside the last element of the rgba function?
  • I've contacted Angus (author of the Stryd field), we've sent a few mails back and forth and Angus found the issue...





    I've verified that this is indeed the issue, after modifying the 1,0 by 1.0 in the iq file the graph displays fine:


    @Connect IQ Team: can you move this thread to the bug reports forum and create a ticket to not use 1,0 but 1.0 inside the last element of the rgba function?


    That's amazing. Congratulations peter and angus for figuring out the issue.

    This has been around for months. Incredible that Garmin didn't find it.

    Can't wait to update my app!
  • Great find. I'll make sure this is documented properly to avoid this issue. :) There are still issues related to Garmin Connect that can prevent color changes from being made, however.
  • Great find. I'll make sure this is documented properly to avoid this issue. :) There are still issues related to Garmin Connect that can prevent color changes from being made, however.


    documentation alone won't help Brandon, as the fitcontributions.json file gets generated over and over, so really the thing that's generating this file should be fixed to not output 1,0 in the last element of the rgba function (but it should output 1.0 )

    so please move this topic to the bug report forum and create a ticket for the programming team so that they can fix it. :)
  • It sounds like a locale issue. I'm assuming Angus is developing his code on a platform en_US (or compatible) locale information, and affected users are using some locale where comma is the decimal separator when writing out the float representing alpha.