# Applying specific colors to a p5.Geometry

**URL:** https://discourse.processing.org/t/applying-specific-colors-to-a-p5-geometry/5228
**Category:** Coding Questions
**Created:** [November 5, 2018, 2:51pm UTC](https://discourse.processing.org/t/applying-specific-colors-to-a-p5-geometry/5228 "2018-11-05T14:51:51Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![philippe](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/philippe/32/2227_2.png) [@philippe](https://discourse.processing.org/u/philippe)
#### Post date: [November 5, 2018, 2:51pm UTC](https://discourse.processing.org/t/applying-specific-colors-to-a-p5-geometry/5228/1 "2018-11-05T14:51:51Z")

</div>

I have made a sphere using new p5.Geometry()

```auto
geometry = new p5.Geometry(definition, definition, ellipsoid);
geometry.computeFaces()._makeTriangleEdges()._edgesToVertices();
renderer.createBuffers(gId, geometry);
renderer.drawBuffersScaled(gId, radiusX, radiusY, radiusZ);

```

I would like to be able to apply what ever color I want to each face of the sphere  
My goal is to draw a little planet with its elevation map and apply colors according to the elevation

I have already done one version WITHOUT new p5.Geometry using the command vertex() but i imagine new p5.Geometry() could give me more flexibility and power.

Can you help me ?
