# In 2d view castlebox isn't white

**URL:** https://forum.castle-engine.io/t/in-2d-view-castlebox-isnt-white/1348
**Category:** 2D
**Created:** [September 14, 2024, 6:40pm UTC](https://forum.castle-engine.io/t/in-2d-view-castlebox-isnt-white/1348 "2024-09-14T18:40:08Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![BlueIcaro](https://forum.castle-engine.io/letter_avatar_proxy/v4/letter/b/eada6e/32.png) [@BlueIcaro](https://forum.castle-engine.io/u/BlueIcaro)
#### Post date: [September 14, 2024, 6:40pm UTC](https://forum.castle-engine.io/t/in-2d-view-castlebox-isnt-white/1348/1 "2024-09-14T18:40:08Z")

</div>

Hello, I make a small example with tcastlebox, I put color to FFFFFF, but the image isn’t white, take a look

 ![imagen](https://forum.castle-engine.io/uploads/default/original/2X/4/464e6044c7742098bb61623a794abad0799ba690.png)  
 ![imagen](https://forum.castle-engine.io/uploads/default/original/2X/8/882eb1dce647e900f0950d43771f68f268cce1f2.png)

What am i doing wrong?  
Thanks  
/BlueIcaro

---

<div class="post-metadata">

### Author: ![edj](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/edj/32/1701_2.png) [@edj](https://forum.castle-engine.io/u/edj)
#### Post date: [September 14, 2024, 10:21pm UTC](https://forum.castle-engine.io/t/in-2d-view-castlebox-isnt-white/1348/2 "2024-09-14T22:21:16Z")

</div>

No lighting? You can set emissive color to be regardless of lighting.

---

<div class="post-metadata">

### Author: ![michalis](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/michalis/32/3_2.png) [@michalis](https://forum.castle-engine.io/u/michalis)
#### Post date: [September 15, 2024, 2:47am UTC](https://forum.castle-engine.io/t/in-2d-view-castlebox-isnt-white/1348/3 "2024-09-15T02:47:35Z")

</div>

It does indeed seem that the box is black because no light shines on it.

In case of TCastleBox, and using it for 2D games (which typically have no lighting), switch the `Material` from `pmPhysical` to `pmUnlit`. Then the `Color` (whether it is white or something else) will be correctly visible (it will be used as `TUnlitMaterial.Emissive` internally).

The alternative solution is naturally to add some lights, e.g. add TCastleDirectionalLight with direction (0,0,-1). But this is likely unnecessary if you really don’t want to care about lighting – in which case using “unlit” for everything is simpler and more efficient. 2D games typically use “unlit” for everything.

Note: You can check out how a new “Viewport (2D)” component is set up (create new project with "Empty’ template, open view, add “Viewport (2D)”), it has TCastlePlane with unlit by default.

 ![obraz](https://forum.castle-engine.io/uploads/default/original/2X/3/365b80a8f0b0b7fef553a53a63292b86091f237f.png)

---

<div class="post-metadata">

### Author: ![BlueIcaro](https://forum.castle-engine.io/letter_avatar_proxy/v4/letter/b/eada6e/32.png) [@BlueIcaro](https://forum.castle-engine.io/u/BlueIcaro)
#### Post date: [September 16, 2024, 5:28pm UTC](https://forum.castle-engine.io/t/in-2d-view-castlebox-isnt-white/1348/4 "2024-09-16T17:28:51Z")

</div>

Thanks for all replies. I don’t use lights in 2D, I thought I did not need them 🤭

I trying to reply the game pong ([Pong - Wikipedia](https://en.wikipedia.org/wiki/Pong)). So I will the option Material = pmUnlit

/BlueIcaro
