### RGB Color as Map

' Get a RGB color as Map. The rgb values are rounded.
' Example:
' Dim m As Map = Helper.getColorAsRGBMap(Value)
' m.Get("r"),m.Get("g"), m.Get("b")
`Sub getColorAsRGBMap(ColorValue As Paint) As Map
Dim joCP As JavaObject = ColorValue
Dim R As Double = joCP.RunMethod("getRed", Null)
Dim G As Double = joCP.RunMethod("getGreen", Null)
Dim B As Double = joCP.RunMethod("getBlue", Null)
Dim m As Map = CreateMap("r":Round(R * 255),"g":Round(G * 255),"b":Round(B * 255))
Return m
End Sub`

Changed: , Category: Colors, File: T6C174M1261.htm, ID: 1261