import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
import javafx.scene.paint.Color;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.objects.collections.Map;
..
.. additional code
..
//List of Color Names and Values as a Map
public static List<Map> getColorMap() throws IllegalArgumentException, IllegalAccessException, ClassNotFoundException
{
List<Map> colors = new ArrayList<Map>();
Class<?> clcolor = Class.forName("javafx.scene.paint.Color");
if (clcolor != null) {
Field[] field = clcolor.getFields();
for (int i = 0; i < field.length; i++) {
Field f = field[i];
// Get Name
Object objn = f.get(null);
if(objn instanceof Color){
Color c = (Color) objn;
Map m = new Map();
m.Initialize();
m.Put("Name", f.getName());
m.Put("Value", c.toString());
colors.add(m);
}
}
}
return colors;
}