<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic rgba color parameter alpha channel doesn't work in Vuforia Studio</title>
    <link>https://www.ptcusercommunity.com/t5/Vuforia-Studio/rgba-color-parameter-alpha-channel-doesn-t-work/m-p/579691#M4557</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi, I just had some issues with getting an app parameter to change the color of a model item to work.&amp;nbsp;Eventually I found out there are some problems with the alpha channel.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm using Vuforia Studio 8.3.5.3961 and in the preview it only displays colors fully opaque, even when I set the alpha channel to 0. It's simply ignored, but on my Iphone 5s IOS 12.1&lt;SPAN&gt;(16B92) in Vuforia View&amp;nbsp;&amp;nbsp;8.3.50, it doesn't display any color when the alpha channel is not set to 1. Unfortunately I cannot test this on another device.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Can anyone&amp;nbsp;reproduce&amp;nbsp;this issue on her/his device? And a&lt;/SPAN&gt;&lt;SPAN&gt;re there any known issues/bugs, that can cause this?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks in advance for any help.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Nov 2018 21:41:44 GMT</pubDate>
    <dc:creator>Accelero</dc:creator>
    <dc:date>2018-11-27T21:41:44Z</dc:date>
    <item>
      <title>rgba color parameter alpha channel doesn't work</title>
      <link>https://www.ptcusercommunity.com/t5/Vuforia-Studio/rgba-color-parameter-alpha-channel-doesn-t-work/m-p/579691#M4557</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi, I just had some issues with getting an app parameter to change the color of a model item to work.&amp;nbsp;Eventually I found out there are some problems with the alpha channel.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm using Vuforia Studio 8.3.5.3961 and in the preview it only displays colors fully opaque, even when I set the alpha channel to 0. It's simply ignored, but on my Iphone 5s IOS 12.1&lt;SPAN&gt;(16B92) in Vuforia View&amp;nbsp;&amp;nbsp;8.3.50, it doesn't display any color when the alpha channel is not set to 1. Unfortunately I cannot test this on another device.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Can anyone&amp;nbsp;reproduce&amp;nbsp;this issue on her/his device? And a&lt;/SPAN&gt;&lt;SPAN&gt;re there any known issues/bugs, that can cause this?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks in advance for any help.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Nov 2018 21:41:44 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Vuforia-Studio/rgba-color-parameter-alpha-channel-doesn-t-work/m-p/579691#M4557</guid>
      <dc:creator>Accelero</dc:creator>
      <dc:date>2018-11-27T21:41:44Z</dc:date>
    </item>
    <item>
      <title>Re: rgba color parameter alpha channel doesn't work</title>
      <link>https://www.ptcusercommunity.com/t5/Vuforia-Studio/rgba-color-parameter-alpha-channel-doesn-t-work/m-p/579895#M4563</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;so could you give ,please, an example how did you set the value? Directly via the property or in inside the javascript?&lt;/P&gt;
&lt;P&gt;example:&lt;/P&gt;
&lt;P&gt;... via javascript calling the script like :&lt;/P&gt;
&lt;PRE&gt;$scope.setWidgetProp("modelItem-1", "color",&amp;nbsp; "rgba(128,0,0, 0.3)");&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2018-11-06_10-27-12.jpg" style="width: 400px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/11850iFE359925B7BB36B8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2018-11-06_10-27-12.jpg" alt="2018-11-06_10-27-12.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;So on the preview it seems that no transparancy is shown - means the transp. is ignored&lt;/P&gt;
&lt;P&gt;So&amp;nbsp; tried also&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;$scope.setWidgetProp("modelItem-1", "color",  "rgba(128,0,0,0)"); //brown
and $scope.setWidgetProp("modelItem-1", "color",  "rgba(128,0,0,1)");&lt;/PRE&gt;
&lt;P&gt;but the same result in preview as shown in the picuture above.&lt;/P&gt;
&lt;P&gt;So tested now on devices -&amp;gt; on IOS and&amp;nbsp; Android&lt;/P&gt;
&lt;P&gt;On android Galaxy S9+ the transperancy was working fine -&amp;gt; so the call&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;$scope.setWidgetProp("modelItem-1", "color",&amp;nbsp; "rgba(128,0,0, 0.3)");&lt;/PRE&gt;
&lt;P&gt;the modelitem-1 is displayed with the correct value of transparency&lt;/P&gt;
&lt;P&gt;I tested the same code on IOS&amp;nbsp; but it was not working. Means it did not display transparency but also the color was not set.&lt;/P&gt;
&lt;P&gt;So with&amp;nbsp; furter tests I found that on IOS seems to work only if the value is transp is 0 or 1&lt;/P&gt;
&lt;P&gt;so the call&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;$scope.setWidgetProp("modelItem-1", "color",  "rgba(128,0,0,1)");&lt;/PRE&gt;
&lt;P&gt;will be displayed correctly in brown color&lt;/P&gt;
&lt;P&gt;and the call&lt;/P&gt;
&lt;PRE&gt;$scope.setWidgetProp("modelItem-1", "color",  "rgba(128,0,0,0)");&lt;/PRE&gt;
&lt;P&gt;will make the modelitem invisible!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Nov 2018 09:54:58 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Vuforia-Studio/rgba-color-parameter-alpha-channel-doesn-t-work/m-p/579895#M4563</guid>
      <dc:creator>RolandRaytchev</dc:creator>
      <dc:date>2018-11-06T09:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: rgba color parameter alpha channel doesn't work</title>
      <link>https://www.ptcusercommunity.com/t5/Vuforia-Studio/rgba-color-parameter-alpha-channel-doesn-t-work/m-p/579906#M4564</link>
      <description>&lt;P&gt;I did some furhter tests:&lt;/P&gt;
&lt;PRE&gt;$scope.setWidgetProp("modelItem-1", "color",  "rgba(128,0,0,1);"); //brown
$scope.setWidgetProp("modelItem-1", "opacity",  "0.3"); //set transparency to 0.3&lt;BR /&gt;//or this will also work&lt;BR /&gt;$scope.setWidgetProp("modelItem-1", "opacity",  0.3); //set transparency to 0.3&lt;/PRE&gt;
&lt;P&gt;So seems that the better approach is to use for the transparency setting the opacity property. This is also the supported way to to set the transparency&amp;nbsp; - and here also the setting of the alpha channel.&amp;nbsp; Because the effect of this code&amp;nbsp;on android device is the same:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;$scope.setWidgetProp("modelItem-1", "color",  "rgba(128,0,0,1);"); //brown
$scope.setWidgetProp("modelItem-1", "opacity",  "0.3"); //set transparency to 0.3&lt;/PRE&gt;
&lt;P&gt;with the call of&lt;/P&gt;
&lt;PRE&gt;$scope.setWidgetProp("modelItem-1", "color",  "rgba(128,0,0,0.3);"); //currently work only on Android device
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;On all other devices (IOS and HoloLens)&amp;nbsp; the "alpha channel" setting will be ignored (it could be only = 1&amp;nbsp; - displayed or = 0 hidden)&lt;/P&gt;
&lt;P&gt;Therefore , I think, is better if you&amp;nbsp;&amp;nbsp;set&amp;nbsp;the opacity modelItem property , because this will work&amp;nbsp; on the same way on all devices:&lt;/P&gt;
&lt;PRE&gt;$scope.view.wdg['modelItem-1']['color'] = "rgba(128,0,0, 1);";//brown&lt;BR /&gt;$scope.view.wdg['modelItem-1']['opacity'] = 0.5;//set transparency to 0.5&lt;BR /&gt;//or for the same &lt;BR /&gt;$scope.setWidgetProp("modelItem-1", "color", "rgba(128,0,0,1);"); //brown&lt;BR /&gt;$scope.setWidgetProp("modelItem-1", "opacity", 0.5); //set transparency to 0.5&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Nov 2018 11:54:22 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Vuforia-Studio/rgba-color-parameter-alpha-channel-doesn-t-work/m-p/579906#M4564</guid>
      <dc:creator>RolandRaytchev</dc:creator>
      <dc:date>2018-11-06T11:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: rgba color parameter alpha channel doesn't work</title>
      <link>https://www.ptcusercommunity.com/t5/Vuforia-Studio/rgba-color-parameter-alpha-channel-doesn-t-work/m-p/580002#M4574</link>
      <description>&lt;P&gt;Yeah&amp;nbsp;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/24955"&gt;@RolandRaytchev&lt;/a&gt;&amp;nbsp;has it. The alpha channel seems to be ignored and you have to change the opacity value. It makes sense that the opacity value is THE control for modelItem transparency as you need to set that independent of color. The real question is why Studio uses rgba instead of just rgb. Seems like the A is unused.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Nov 2018 18:43:38 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Vuforia-Studio/rgba-color-parameter-alpha-channel-doesn-t-work/m-p/580002#M4574</guid>
      <dc:creator>jmikesell</dc:creator>
      <dc:date>2018-11-06T18:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: rgba color parameter alpha channel doesn't work</title>
      <link>https://www.ptcusercommunity.com/t5/Vuforia-Studio/rgba-color-parameter-alpha-channel-doesn-t-work/m-p/580163#M4589</link>
      <description>&lt;P&gt;Hi, thanks for the response. That's what I suspected. I was just wondering if it's an issue with my device or if I did anything wrong. I came to the same result and also wondering why rgba is used instead of rgb.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 20:59:28 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Vuforia-Studio/rgba-color-parameter-alpha-channel-doesn-t-work/m-p/580163#M4589</guid>
      <dc:creator>Accelero</dc:creator>
      <dc:date>2018-11-07T20:59:28Z</dc:date>
    </item>
  </channel>
</rss>

