Change color palette dynamically

Yeah, that’s why we marked it as beta. We still need to figure out what the API for creating palettes should look like.

Do you have any suggestions? What would the ideal block look like for you @UnsignedArduino?

This is what I thought of when you first asked me, but there is one major drawback - You wouldn’t see the color changes immediately so you wouldn’t know which color is being changed.


Or maybe something like this


This would probably be the easiest to implement

1 Like

The second one you mentioned (numbers 1-15 w/ a color picker field editor along the lines of the chrome one here) is what I’ve been wanting to do, but just haven’t had time / forgotten about doing it when I have had time. Might be a good thing to start over the weekend, now that I’m stuck at home…

The last one you mentioned should be trivial to add, and I suppose a version with slots for values instead of a field editor will be helpful for changing colors programmatically anyways, so I’ll take a look at doing that real quick :slight_smile: It’s an extension in a separate repo anyways so it can be updated without a release of the editor

RGB HSV light blocks

You could use the second one and be able to use these blocks.


Or these blocks in the light extension.

1 Like

Hm, that might be a little harder looking at it; no problem implementation wise, but it would add a dependency on the neopixel light for just those two blocks, and would probably be harder to find / interact with across two different categories; for now I think I’ll duplicate those in the color extension and we can take a look deduping that in the future (changing that package requires a full update to arcade itself). Thanks for pointing that out though!

Thanks for helping me!

1 Like

No problem! Thanks for helping design the blocks / confirming what the design of the field editor block should ideally be!

Just added the blocks to the color fading extension, you’ll need to update it to get them. Sorry for the delay, was at the store for a bit getting some stuff for dinner :slight_smile: Please let me know if they give you any trouble, haven’t built anything with it besides a trivial test example but I’ll probably play around with it this weekend. (also need to figure out why the set color palette and fade from blocks broke, I think I had checked them just before the last release but for some reason the builtin palettes aren’t loading as a drop down anymore… weird this should be fixed as well with v0.1.1, minor internal bug I could work around :slight_smile: )

1 Like

Thank you so much!

I haven’t updated them yet, because I am replying on a phone. But I am so excited to try them out. :smile:


1 Like

Just tried it, looks so cool! I love the built in color palettes!

I cannot express my thanks enough :smiley:

1 Like

Glad to hear it’s useful, and thanks for pointing out it broke a while back :slight_smile:

Also, if you want to add your own color palettes (or make an extension with your own!) they’re defined here: – the little comment magic above it is what turns it from a constant into a value in the dropdown – besides a few of the specialty ones, most are from

1 Like

Another variation on the theme: Palette blocks extension

Can I set a custom colour palette for just certain sprites and then reset the default palette for the rest of the game in JavaScript?

Only 16 colors (including clear) can be on the screen at once - if you change colors it will change for all sprites.

One workaround, if you can find a few colors that you can live without, is to use those indices as special placeholder colors for the sprites and only ever change those - I do something like that for the team colors in - leave all but 4 colors as one color palette, and change the last 4 based on the teams that are chosen.

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


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


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


Big brain words- can’t- comprehend-