Addo Well-Known Member Licensed User Longtime User May 6, 2018 #1 is it possible to have a function that convert b4a colors to html color ?
MarkusR Well-Known Member Licensed User Longtime User May 6, 2018 #3 something like this, but it is with alpha. B4X: Log("#" & Bit.ToHexString(Colors.Red)) in html also exist a extension of color RGBA https://www.w3schools.com/html/html_colors.asp Upvote 0
something like this, but it is with alpha. B4X: Log("#" & Bit.ToHexString(Colors.Red)) in html also exist a extension of color RGBA https://www.w3schools.com/html/html_colors.asp
Addo Well-Known Member Licensed User Longtime User May 6, 2018 #4 i dont know if what i am thinking is correct but is this can be valid also ? B4X: dim gethtmlcolor As string gethtmlcolor = 0xff000000 gethtmlcolor = gethtmlcolor.replace("0xff", ""); so only html color can be extracted ? Upvote 0
i dont know if what i am thinking is correct but is this can be valid also ? B4X: dim gethtmlcolor As string gethtmlcolor = 0xff000000 gethtmlcolor = gethtmlcolor.replace("0xff", ""); so only html color can be extracted ?
Erel B4X founder Staff member Licensed User Longtime User May 7, 2018 #5 B4X: Sub ColorToHex(clr As Int) As String Dim bc As ByteConverter Return "#" & bc.HexFromBytes(bc.IntsToBytes(Array As Int(clr))) End Sub Upvote 0
B4X: Sub ColorToHex(clr As Int) As String Dim bc As ByteConverter Return "#" & bc.HexFromBytes(bc.IntsToBytes(Array As Int(clr))) End Sub