The coloring method works in JavaFX 3D networks based on the material that you assigned to them. There is one material for one grid, and it is impossible to imagine different materials for different triangles of the same grid.
So, if you want to avoid textures, I’m afraid that the only way is to group triangles with the same color in the same grid and create as many grids as colors.
Conversely, with textures is relatively easy ... since you only have one grid, one material and one image with all the coloring.
I gave an example of an icosahedron, built a mesh triangle for it, and added one texture to color all faces.
For this we need:
- three-dimensional coordinates of 12 vertices,
- 2D-normalized coordinates for uv mapping for textures.
and 20 persons. Each face is defined by 6 indices p0, t0, p1, t1, p3, t3, where p0, p1, p2 and p3 are indices in the points array, and t0, t1, t2 and t3 are indices in the texCoords array.
Public class IcosahedronMesh extends MeshView {
public IcosahedronMesh(){ setMesh(createCube()); } private TriangleMesh createCube() { TriangleMesh m = new TriangleMesh();
}
Now we need a coloring image for each face based on the icosahedron network, for example:

(Image found here )
Note that the mapping is performed from (0,0) to (1,1) normalized coordinates on the image (left, top) in (right, bottom) pixels.
Let's finally create a scene, load the mesh and add a texture to its material:
@Override public void start(Stage primaryStage) throws Exception { Group sceneRoot = new Group(); Scene scene = new Scene(sceneRoot, 600, 600, true, SceneAntialiasing.BALANCED); scene.setFill(Color.BLACK); PerspectiveCamera camera = new PerspectiveCamera(true); camera.setNearClip(0.1); camera.setFarClip(10000.0); camera.setTranslateZ(-4); scene.setCamera(camera); IcosahedronMesh mesh = new IcosahedronMesh(); mesh.setCullFace(CullFace.FRONT); PhongMaterial mat = new PhongMaterial(); mat.setDiffuseMap(new Image(getClass().getResourceAsStream("icosah_net.png"))); mesh.setMaterial(mat); Rotate rotateY = new Rotate(0, 0, 0, 0, Rotate.Y_AXIS); mesh.getTransforms().addAll(new Rotate(30,Rotate.X_AXIS),rotateY); sceneRoot.getChildren().addAll(mesh, new AmbientLight(Color.WHITE)); primaryStage.setTitle("JavaFX 3D - Icosahedron"); primaryStage.setScene(scene); primaryStage.show(); }
Here's what it looks like:

EDIT
Now, if you are thinking about how texture is applied, you can simplify the image to a few squares with the color palette you need:

And texture coordinates can be really simplified:
m.getTexCoords().addAll( 0.1f, 0.5f, // 0 red 0.3f, 0.5f, // 1 green 0.5f, 0.5f, // 2 blue 0.7f, 0.5f, // 3 yellow 0.9f, 0.5f // 4 orange );
Finally, we must match these points on our faces. Following the same pattern as the network image:
m.getFaces().addAll( 1, 0, 11, 0, 7, 0, 1, 4, 7, 4, 6, 4, 1, 4, 6, 4, 10, 4, 1, 2, 10, 2, 3, 2, 1, 2, 3, 2, 11, 2, 4, 3, 8, 3, 0, 3, 5, 3, 4, 3, 0, 3, 9, 1, 5, 1, 0, 1, 2, 1, 9, 1, 0, 1, 8, 0, 2, 0, 0, 0, 11, 3, 9, 3, 7, 3, 7, 1, 2, 1, 6, 1, 6, 1, 8, 1, 10, 1, 10, 0, 4, 0, 3, 0, 3, 0, 5, 0, 11, 0, 4, 4, 10, 4, 8, 4, 5, 4, 3, 4, 4, 4, 9, 2, 11, 2, 5, 2, 2, 2, 7, 2, 9, 2, 8, 3, 6, 3, 2, 3 );
Now we will have a very neat icosahedron, since we will get rid of borders and poor image resolution:

This can be expanded to any triangular grid or use any algorithm to refine triangles.