# Change the color of a face of a sphere geometry on hover

**URL:** <https://discourse.threejs.org/t/change-the-color-of-a-face-of-a-sphere-geometry-on-hover/42745>\
**Category:** Questions\
**Tags:** color, geometry\
**Created:** [September 20, 2022, 3:58pm UTC](https://discourse.threejs.org/t/change-the-color-of-a-face-of-a-sphere-geometry-on-hover/42745 "2022-09-20T15:58:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![melvin\_debot](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/melvin_debot/32/28526_2.png) [@melvin\_debot](https://discourse.threejs.org/u/melvin_debot)\
**Post date:** [September 20, 2022, 3:58pm UTC](https://discourse.threejs.org/t/change-the-color-of-a-face-of-a-sphere-geometry-on-hover/42745/1 "2022-09-20T15:58:21Z")

</div>

Hello everyone I am a beginner in Three js what I would like to do is that when we fly over the sphere a cube is added in my scene and when the sphere is in contact with the cube, that all the faces that are inside my cube change color however I have the following error someone have an idea why please

 ![Capture d’écran 2022-09-20 à 17.49.45](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/6/1/61a915ba863ce10d5eef4d4dc6391bcd4e3f6b0d.png)

Here is my code on it

> **[Change face color sphere (forked) - CodeSandbox](https://codesandbox.io/s/change-face-color-sphere-forked-seq87e?file=%2Fsrc%2Findex.js)**
>
> Change face color sphere (forked) by melvindebot using @react-three/drei, react, react-dom, react-scripts, react-three-fiber, three

And here is the type of example I would like to have  
[https://hofk.de/main/discourse.threejs/2019/SelectFacesWithinRadius/SelectFacesWithinRadius.html](https://hofk.de/main/discourse.threejs/2019/SelectFacesWithinRadius/SelectFacesWithinRadius.html)
