Get the chrome color of the host application?

Is there a way to get the background color of the UXP environment? I’d like to get the same color as the background of the panel.

I’ve tried the system colors and I see predefined color variables but don’t see one that matches the host application background.

On OSX the XD background is #F5F5F5 according to the color picker.

I don’t see that value listed in the style variables or defined in the user agent.

I’ve looked at the system colors properties (shown below) to see if there are any chrome colors defined and I have only found a few that work in UXP.

I couldn’t find this for Ps either. Would be great if we had those

1 Like

It should be --uxp-host-background-color.
Works in Photoshop. Haven’t tested it in XD.

1 Like

It looks like those styles might only be in Photoshop.

In XD debugger autocomplete doesn’t list any --uxp-host-* variables: