B4J Question setColor event of Color Picker is not working

jkhazraji

Active Member
Licensed User
Longtime User

teddybear

Well-Known Member
Licensed User
I guess you didn't click the button to confirm the color
clickhere.png
 
Upvote 1

jkhazraji

Active Member
Licensed User
Longtime User
I could figure it out, converting an Int Color value to javafx.scene.paint.Paint:
B4X:
Sub GetARGB(Color As Int) As Object
    Private res(4) As Int
    res(0) = Bit.UnsignedShiftRight(Bit.And(Color, 0xff000000), 24)
    res(1) = Bit.UnsignedShiftRight(Bit.And(Color, 0xff0000), 16)
    res(2) = Bit.UnsignedShiftRight(Bit.And(Color, 0xff00), 8)
    res(3) = Bit.And(Color, 0xff)
    Dim paint As Object= fx.Colors.ARGB(res(0),res(1),res(2),res(3))

    Return paint
End Sub
Thanks anyway.
 
Upvote 0
Top