I attempted to bind a backgroundColor property to an expression that was just the color() expression function to quickly get a color from three values. However, this doesn't actually make the correct color show up as the background. In the little preview color square next to the backgroundColor value (that reads 'java.awt.Color[r=44,g=55,b=66]'), the color is correct, that just doesn't make it to the actual background.
The red in the example there is from when I clicked the color preview square and picked red, then tried to refresh the expression binding. When put into run/preview mode, it switches to a white background, or whatever the default background color is.
This is on b2018112110. Reproduction can be done on any component, I obviously use a slider component and its backgroundColor property.
I figured, and I hope it won’t be too much to adapt it to Perspective use somehow. And that was just an example, I was testing a couple sliders making up a color for something else, but still easy to format it into the hex string like you mentioned.
Actually, I tried this and it doesn't work for colors with no Red or Green components in it. That's because the hex function doesn't pad the value with leading zeros. Instead, I would suggest using this (I also added alpha):