# 6-bit RGB help

**URL:** https://forum.makecode.com/t/6-bit-rgb-help/39620
**Category:** Help
**Created:** [October 3, 2025, 5:32pm UTC](https://forum.makecode.com/t/6-bit-rgb-help/39620 "2025-10-03T17:32:58Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![VoxelMaster64](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/voxelmaster64/32/32075_2.png) [@VoxelMaster64](https://forum.makecode.com/u/VoxelMaster64)
#### Post date: [October 3, 2025, 5:32pm UTC](https://forum.makecode.com/t/6-bit-rgb-help/39620/1 "2025-10-03T17:32:58Z")

</div>

My project is not acting right. I have comments everywhere to explain what’s happening and how it should work, so can you please help?

> **[6-bit rgb](https://arcade.makecode.com/S34591-12298-90319-18408)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

### Author: ![Username888](https://avatars.discourse-cdn.com/v4/letter/u/8e7dd6/32.png) [@Username888](https://forum.makecode.com/u/Username888)
#### Post date: [October 3, 2025, 9:30pm UTC](https://forum.makecode.com/t/6-bit-rgb-help/39620/2 "2025-10-03T21:30:37Z")

</div>

What is it supposed to be doing? (Or where are the comments?)

---

<div class="post-metadata">

### Author: ![VoxelMaster64](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/voxelmaster64/32/32075_2.png) [@VoxelMaster64](https://forum.makecode.com/u/VoxelMaster64)
#### Post date: [October 4, 2025, 4:32am UTC](https://forum.makecode.com/t/6-bit-rgb-help/39620/3 "2025-10-04T04:32:49Z")

</div>

It should convert a string (something like: “000 034 142 000 | 111 222 333 444” (it auto converts that to “000034142000|111222333444”)) to an image. It then changes the 3 digit numbers that range from 0 - 5, to an rgb color (for 012 345 | 543 210 it would act as rgb rgb newline rgb rgb) so that 0 is transparent, and 1 - 5 is dark to light (1 darkest, 5 lightest). A | signifies to go to the next row of pixels. For 123123|123123|123|123543010, it would be a 3x4 image (technically 9x12)). One rgb pixel is a 3x3, one column of r, one column of g, one column of b. I named the format Hex6.

---

<div class="post-metadata">

### Author: ![WoofWoof](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/woofwoof/32/32523_2.png) [@WoofWoof](https://forum.makecode.com/u/WoofWoof)
#### Post date: [October 4, 2025, 6:13pm UTC](https://forum.makecode.com/t/6-bit-rgb-help/39620/4 "2025-10-04T18:13:25Z")

</div>

Ok I see what you’re trying to do and where it went wrong. First of all, you’ll need to fix the weird row stacking issue, which is caused by the next row being only shifted down by one instead of 3:

 ![Screenshot 2025-10-04 at 12.16.11 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/f/2/f2dc70eb4c36a1bd132e1a1f3791c808717017c8.png)  
Then you have an issue where your colors are all messed up and are alternating red and green. This is because that “num” variable can never actually be “2”. This is because as soon as it becomes 2 it activates the IF statement under it and becomes 0 again. This is an easy fix, just make the IF statement check for a 3 instead of a 2:  
 ![Screenshot 2025-10-04 at 12.25.05 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/3/b/3bc7d745ab13ff6e221a713a6fdb49a38942d926.png)  
Then lastly, all the blues are green, and that’s because you haven’t changed those +5s to +10s:  
 ![Screenshot 2025-10-04 at 12.25.13 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/a/8/a8fc05069075ccc9b7bae64507b900db3d0af542.png)  
And look at that, everything works now!  
 ![Screenshot 2025-10-04 at 12.32.07 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/5/1/518ec476e25bb8a62db8bc924196b8d1542421c2.png)  
:)

---

<div class="post-metadata">

### Author: ![VoxelMaster64](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/voxelmaster64/32/32075_2.png) [@VoxelMaster64](https://forum.makecode.com/u/VoxelMaster64)
#### Post date: [October 5, 2025, 9:22pm UTC](https://forum.makecode.com/t/6-bit-rgb-help/39620/5 "2025-10-05T21:22:38Z")

</div>

It works! it would definitely look better on a bigger display, like the default screen dimensions times 3. (360x480)
