Change color palette dynamically

Thank you.

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).

3 Likes

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

2 Likes

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

2 Likes

Big brain words- can’t- comprehend-

2 Likes

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

No, you would use the color fading extension.

image

1 Like

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

Thanks so much in advance for any help!

1 Like

Quick follow up- I found this comment in an issue on github : 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…

1 Like

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

I wish there was a extension to have 26 colors.

1 Like

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

advance the hardware?

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.

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.

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

1 Like