float4 refering to another float4

I am very new to Fuse but I wanted to have a better way to style my app.

I came up with having a base set of colors that will be refered to in other places

<float4 ux:Global="Color.NeutralDarkColor" ux:Value="#111111" />

<float4 ux:Global="Theme.MainBackgroundColor" ux:Value="!!!this should be Color.NeutralDarkColor!!!" />
<float4 ux:Global="Theme.HeaderBackgroundColor" ux:Value="!!!this should be Color.NeutralDarkColor!!!" />

<DockPanel Color="{Resource Theme.MainBackgroundColor}">

I am doing this so I only define a small set of colors and then on the specfic controls only refer to their intent (not color).

I cannot seem to find a way for the struict float4 to refer to another float4.

What can be done here?

Hi! This approach should work:

<float4 ux:Global="Theme.MainBackgroundColor" ux:Value="Color.NeutralDarkColor" />

What kind of error message are you getting? Are you using the latest Fuse version?

I was trying to do the same thing with {Resource} but I kinda thought it would not work but was not sure of the correct syntax

<float4 ux:Global="Theme.MainBackgroundColor" ux:Value="{Resource Color.NeutralDarkColor}" />

Cannot parse '{Resource Color.NeutralDarkColor}' as 'float4': 'Input string was not in a correct format.'

But your solution works… And simple.