G GuyBooth Active Member Licensed User Longtime User May 23, 2019 #1 How do I use hex color values with CSSUtils? I want to call B4X: Dim COLOR_TEXT_UNSELECTED as ?? = 0xFF112233 CSSUtils.SetStyleProperty (tglBtn, "-fx-text-fill", COLOR_TEXT_UNSELECTED) but have yet to find the magic types or conversions to make it work. I know that this works: B4X: CSSUtils.SetStyleProperty(tglBtn, "-fx-text-fill", "blue") Any insight would be appreciated...
How do I use hex color values with CSSUtils? I want to call B4X: Dim COLOR_TEXT_UNSELECTED as ?? = 0xFF112233 CSSUtils.SetStyleProperty (tglBtn, "-fx-text-fill", COLOR_TEXT_UNSELECTED) but have yet to find the magic types or conversions to make it work. I know that this works: B4X: CSSUtils.SetStyleProperty(tglBtn, "-fx-text-fill", "blue") Any insight would be appreciated...
Erel B4X founder Staff member Licensed User Longtime User May 24, 2019 #2 B4X: Dim clr As Paint = fx.Colors.From32Bit(0xff00ff00) CSSUtils.SetStyleProperty(.., ,, CSSUtils.ColorToHex(clr)) Upvote 0
B4X: Dim clr As Paint = fx.Colors.From32Bit(0xff00ff00) CSSUtils.SetStyleProperty(.., ,, CSSUtils.ColorToHex(clr))