# Change color palette dynamically

**URL:** https://forum.makecode.com/t/change-color-palette-dynamically/1401
**Category:** Arcade
**Created:** [March 13, 2020, 8:02pm UTC](https://forum.makecode.com/t/change-color-palette-dynamically/1401 "2020-03-13T20:02:21Z")
**Posts on this page:** 16
**Page:** 2

<div class="post-metadata">

### Author: ![GameFreaq](https://avatars.discourse-cdn.com/v4/letter/g/e274bd/32.png) [@GameFreaq](https://forum.makecode.com/u/GameFreaq)
#### Post date: [April 26, 2020, 7:04pm UTC](https://forum.makecode.com/t/change-color-palette-dynamically/1401/21 "2020-04-26T19:04:52Z")

</div>

Thank you.

---

<div class="post-metadata">

### Author: ![GameGod](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gamegod/32/2756_2.png) [@GameGod](https://forum.makecode.com/u/GameGod)
#### Post date: [November 15, 2020, 11:36pm UTC](https://forum.makecode.com/t/change-color-palette-dynamically/1401/22 "2020-11-15T23:36:01Z")

</div>

I know this is old, but I just wanted to say:

You _can_ have infinite colors, just only 15 on the screen at a time. You can do this by changing the color (color fading extension).

---

<div class="post-metadata">

### Author: ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)
#### Post date: [November 15, 2020, 11:52pm UTC](https://forum.makecode.com/t/change-color-palette-dynamically/1401/23 "2020-11-15T23:52:02Z")

</div>

> [@GameGod](#):
>
> You _can_ have infinite colors…

Technically, you mean 16,777,216 colors. (256 values per channel ^ 3 because 3 channels)

---

<div class="post-metadata">

### Author: ![GameGod](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gamegod/32/2756_2.png) [@GameGod](https://forum.makecode.com/u/GameGod)
#### Post date: [November 16, 2020, 12:46am UTC](https://forum.makecode.com/t/change-color-palette-dynamically/1401/24 "2020-11-16T00:46:55Z")

</div>

I stand corrected… 256 because of 255 values for RGB + the value 0. Rounded up, it is infinity (well not really, but-)

---

<div class="post-metadata">

### Author: ![Kat](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/kat/32/2596_2.png) [@Kat](https://forum.makecode.com/u/Kat)
#### Post date: [November 16, 2020, 12:36pm UTC](https://forum.makecode.com/t/change-color-palette-dynamically/1401/25 "2020-11-16T12:36:30Z")

</div>

Big brain words- can’t- comprehend-

---

<div class="post-metadata">

### Author: ![Dreadmask197](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dreadmask197/32/10494_2.png) [@Dreadmask197](https://forum.makecode.com/u/Dreadmask197)
#### Post date: [November 16, 2020, 1:28pm UTC](https://forum.makecode.com/t/change-color-palette-dynamically/1401/26 "2020-11-16T13:28:22Z")

</div>

So you use the light extension to make our own palette?

---

<div class="post-metadata">

### Author: ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)
#### Post date: [November 16, 2020, 1:46pm UTC](https://forum.makecode.com/t/change-color-palette-dynamically/1401/27 "2020-11-16T13:46:29Z")

</div>

No, you would use the `color fading` extension.

![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/1/1bb46d569d15db717d28ee7cd1c971d918132b8c.png)

---

<div class="post-metadata">

### Author: ![GradeSchool](https://avatars.discourse-cdn.com/v4/letter/g/8edcca/32.png) [@GradeSchool](https://forum.makecode.com/u/GradeSchool)
#### Post date: [April 25, 2021, 4:38pm UTC](https://forum.makecode.com/t/change-color-palette-dynamically/1401/28 "2021-04-25T16:38:21Z")

</div>

Hello- this is my first post in the makecode arcade forum. I want to use the Color Fading extension to crate my own palettes. I’ve cloned the repository to my local computer, but I’m lost when trying to figure out what to do next. If I try to edit the built-in palettes, I can’t, they are locked.

If anyone could walk me through how to proceed, that would help me out a great deal. I think after I figure out how to achieve this I will be able to go on to learn more about using (and possibly modifying) extensions like these: [https://github.com/UnsignedArduino/Awesome-Arcade-Extensions#arcade-image-tools](https://github.com/UnsignedArduino/Awesome-Arcade-Extensions#arcade-image-tools)

Thanks so much in advance for any help!

---

<div class="post-metadata">

### Author: ![GradeSchool](https://avatars.discourse-cdn.com/v4/letter/g/8edcca/32.png) [@GradeSchool](https://forum.makecode.com/u/GradeSchool)
#### Post date: [April 25, 2021, 4:38pm UTC](https://forum.makecode.com/t/change-color-palette-dynamically/1401/29 "2021-04-25T16:38:29Z")

</div>

Quick follow up- I found this comment in an issue on github : [https://github.com/jwunderl/pxt-color/issues/2](https://github.com/jwunderl/pxt-color/issues/2) – basically outlining how to create your own custom palette entries in the palettes.ts. So now I just need to figure out how to:

A. make an extension of my own  
B. have this extension as a dependency of my own

as described in the comment…

---

<div class="post-metadata">

### Author: ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)
#### Post date: [April 25, 2021, 11:11pm UTC](https://forum.makecode.com/t/change-color-palette-dynamically/1401/30 "2021-04-25T23:11:59Z")

</div>

Hello @GradeSchool, do you want to create a new palette so that you can choose the palette in the palette drop down menus?

---

<div class="post-metadata">

### Author: ![labfox29](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/labfox29/32/9252_2.png) [@labfox29](https://forum.makecode.com/u/labfox29)
#### Post date: [July 14, 2022, 2:25am UTC](https://forum.makecode.com/t/change-color-palette-dynamically/1401/31 "2022-07-14T02:25:07Z")

</div>

I wish there was a extension to have 26 colors.

---

<div class="post-metadata">

### Author: ![danger\_kitty](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/danger_kitty/32/32006_2.png) [@danger\_kitty](https://forum.makecode.com/u/danger_kitty)
#### Post date: [July 14, 2022, 5:36pm UTC](https://forum.makecode.com/t/change-color-palette-dynamically/1401/32 "2022-07-14T17:36:09Z")

</div>

Well you can’t because the hardware can only support 16 colors at a time

---

<div class="post-metadata">

### Author: ![labfox29](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/labfox29/32/9252_2.png) [@labfox29](https://forum.makecode.com/u/labfox29)
#### Post date: [July 15, 2022, 4:34pm UTC](https://forum.makecode.com/t/change-color-palette-dynamically/1401/33 "2022-07-15T16:34:27Z")

</div>

advance the hardware?

---

<div class="post-metadata">

### Author: ![anon30657772](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@anon30657772](https://forum.makecode.com/u/anon30657772)
#### Post date: [May 31, 2024, 1:03pm UTC](https://forum.makecode.com/t/change-color-palette-dynamically/1401/34 "2024-05-31T13:03:56Z")

</div>

Hey @UnsignedArduino, I don’t know about @GradeSchool , but for me that’s what I need!  
I made a custom color palette from the assets menu and I’d like to select it in the drop down menu.  
The “palettes.ts” is read-only sadly.

---

<div class="post-metadata">

### Author: ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)
#### Post date: [May 31, 2024, 10:28pm UTC](https://forum.makecode.com/t/change-color-palette-dynamically/1401/35 "2024-05-31T22:28:26Z")

</div>

Oh unfortunately that is different from what I originally was talking about - using the color extension’s blocks and adding a new enum that represents a palette. You can follow the directions linked in the GitHub issue to do the same.

---

<div class="post-metadata">

### Author: ![anon30657772](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@anon30657772](https://forum.makecode.com/u/anon30657772)
#### Post date: [June 1, 2024, 5:55pm UTC](https://forum.makecode.com/t/change-color-palette-dynamically/1401/36 "2024-06-01T17:55:13Z")

</div>

Yeah that would be even better if we could do it through code / blocks. I’ll check the directions in GitHub thanks.

[Previous page](https://forum.makecode.com/t/change-color-palette-dynamically/1401.md?page=1)
