fuse-open / fuselibs

Fuselibs is the Uno-libraries that provide the UI framework used in Fuse apps
https://npmjs.com/package/@fuse-open/fuselibs
MIT License
176 stars 72 forks source link

added hexColor and rgba UX Function #1425

Closed ichan-mb closed 3 years ago

ichan-mb commented 3 years ago

Added new hexColor to convert float4 to a hex string representation and rgba to create color from: 0-255

Example:

<Rectangle ux:Name="rect" Width="100" Height="40" Color="rgba(255,0,0,255)" />
<Text Value="{= hexColor(Property rect.Color)}" />
<!-- or -->
<LetFloat ux:Name="r" Value="255" />
<LetFloat ux:Name="g" Value="200" />
<LetFloat ux:Name="b" Value="50" />
<LetFloat ux:Name="a" Value="255" />
<Rectangle  Width="100" Height="40" Color="rgba({r},{g},{b},{a})" >

This PR contains: