Convert string to colour

I have a database and in one of the fields I hold a string e.g. “#AABAF3” and I need to convert this into a colour that I can use in Xojo as a color type e.g. &cAABAF3

I have checked the docs but can’t seem to find how to do this.

[code]Public Function ToColor(extends ColorString As String) as Color
Dim v As Variant = ColorString
Dim c As Color = v.ColorValue
Return c

End Function
[/code]

[code]Public Function ToColor(extends ColorString As String) as Color
Dim v As Variant = ColorString.Replace("#", “&c”)
Dim c As Color = v.ColorValue
Return c

End Function[/code]

Thanks guys