# How to make a color parameter

**URL:** https://forum.makecode.com/t/how-to-make-a-color-parameter/42709
**Category:** Help
**Created:** [March 15, 2026, 9:20pm UTC](https://forum.makecode.com/t/how-to-make-a-color-parameter/42709 "2026-03-15T21:20:33Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![YamJam](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yamjam/32/29681_2.png) [@YamJam](https://forum.makecode.com/u/YamJam)
#### Post date: [March 15, 2026, 9:20pm UTC](https://forum.makecode.com/t/how-to-make-a-color-parameter/42709/1 "2026-03-15T21:20:33Z")

</div>

Some people might know that im getting into creating extensions, and I want to know how I can add a color parameter. Like this:  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/2/3/23dea4bbf08f730caac19456f629358d9d837aa9.png)

---

<div class="post-metadata">

### Author: ![AlexK](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/alexk/32/33339_2.png) [@AlexK](https://forum.makecode.com/u/AlexK)
#### Post date: [March 15, 2026, 11:49pm UTC](https://forum.makecode.com/t/how-to-make-a-color-parameter/42709/2 "2026-03-15T23:49:37Z")

</div>

```javascript
    //% color.shadow="colorNumberPicker"
    export function showColor(color: number) {

    }

```

For more color options in Blocks:

[https://makecode.com/playground#field-editors-color](https://makecode.com/playground#field-editors-color)

---

<div class="post-metadata">

### Author: ![BLADEr](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/blader/32/16422_2.png) [@BLADEr](https://forum.makecode.com/u/BLADEr)
#### Post date: [March 16, 2026, 1:04am UTC](https://forum.makecode.com/t/how-to-make-a-color-parameter/42709/3 "2026-03-16T01:04:07Z")

</div>

I would definitely check out the [arcade blocks playground](https://makecode.com/playground) site! It has a bunch of examples on making custom blocks for extensions.

the color parameter is //% color.shadow=“colorindexpicker”

```
//% block="change screen $color"
//% color.shadow="colorindexpicker"
export function change(color: number) {
    scene.setBackgroundColor(color)
}

```

---

<div class="post-metadata">

### Author: ![YamJam](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yamjam/32/29681_2.png) [@YamJam](https://forum.makecode.com/u/YamJam)
#### Post date: [March 16, 2026, 2:17am UTC](https://forum.makecode.com/t/how-to-make-a-color-parameter/42709/4 "2026-03-16T02:17:34Z")

</div>

@BLADEr and @AlexK, I tried these but none of them worked, it still has me input a number ☹ Maybe it’s because I’m trying to use multiple parameters?

see this:

# [My first time trying to make an extension](https://forum.makecode.com/t/my-first-time-trying-to-make-an-extension/42697)

---

<div class="post-metadata">

### Author: ![AlexK](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/alexk/32/33339_2.png) [@AlexK](https://forum.makecode.com/u/AlexK)
#### Post date: [March 16, 2026, 2:20am UTC](https://forum.makecode.com/t/how-to-make-a-color-parameter/42709/5 "2026-03-16T02:20:00Z")

</div>

Are you creating new releases every time you make a change? How are you testing your extension?

---

<div class="post-metadata">

### Author: ![YamJam](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yamjam/32/29681_2.png) [@YamJam](https://forum.makecode.com/u/YamJam)
#### Post date: [March 16, 2026, 4:10pm UTC](https://forum.makecode.com/t/how-to-make-a-color-parameter/42709/6 "2026-03-16T16:10:32Z")

</div>

I just change the part of the block into the code that you showed me, then I simply go into blocks and see if the block looks the way I want.

---

<div class="post-metadata">

### Author: ![YamJam](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yamjam/32/29681_2.png) [@YamJam](https://forum.makecode.com/u/YamJam)
#### Post date: [March 16, 2026, 4:10pm UTC](https://forum.makecode.com/t/how-to-make-a-color-parameter/42709/7 "2026-03-16T16:10:59Z")

</div>

_without_ releasing new extension updates, in fact, I haven’t made a new release since the first broken/useless version!

---

<div class="post-metadata">

### Author: ![NeverStopTheCoder](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/neverstopthecoder/32/21194_2.png) [@NeverStopTheCoder](https://forum.makecode.com/u/NeverStopTheCoder)
#### Post date: [March 16, 2026, 4:14pm UTC](https://forum.makecode.com/t/how-to-make-a-color-parameter/42709/8 "2026-03-16T16:14:45Z")

</div>

does this help

//% color.shadow=“colorindexpicker”

export function name of your block(color: number): void {

}

This is what it would look like

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/7/3/7325d3ec550155632b496b8f07da9c8c67bd0ef3.png)

It would look like this in the blocks

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/5/7/57836202b90b87bcafbea3b5afe3c98f3c81db7b.png)

Or you can try

//% color.shadow=“colorNumberPicker”

For

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/4/c/4c51d6db3243a9afca4ffef62736ca6f480e831e.png)

Or

//% color.shadow=“colorWheelPicker”

For

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/5/a/5ad04c0c98ae4e64477a542f670abaa6ea1f8fc6.png)

Or

//% color.shadow=“colorWheelHsvPicker”

For

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/a/f/af32e4755be8ee1a84220b912e6e7594020ad85f.png)

---

<div class="post-metadata">

### Author: ![YamJam](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yamjam/32/29681_2.png) [@YamJam](https://forum.makecode.com/u/YamJam)
#### Post date: [March 17, 2026, 1:27am UTC](https://forum.makecode.com/t/how-to-make-a-color-parameter/42709/9 "2026-03-17T01:27:49Z")

</div>

It works but I need it to show up four times, each choosing the color of a different sprite the block creates.

---

<div class="post-metadata">

### Author: ![NeverStopTheCoder](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/neverstopthecoder/32/21194_2.png) [@NeverStopTheCoder](https://forum.makecode.com/u/NeverStopTheCoder)
#### Post date: [March 17, 2026, 10:12pm UTC](https://forum.makecode.com/t/how-to-make-a-color-parameter/42709/10 "2026-03-17T22:12:38Z")

</div>

like this

//% color.shadow=“colorindexpicker”

//% color2.shadow=“colorindexpicker”

//% color3.shadow=“colorindexpicker”

export function name of your block(color: number,color2: number,color3: number): void {

}

---

<div class="post-metadata">

### Author: ![YamJam](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yamjam/32/29681_2.png) [@YamJam](https://forum.makecode.com/u/YamJam)
#### Post date: [March 17, 2026, 10:27pm UTC](https://forum.makecode.com/t/how-to-make-a-color-parameter/42709/11 "2026-03-17T22:27:16Z")

</div>

Ohhhhhhhh thanks, I’ll test it out. I thought you HAD to do color.shadow… and that the parameter HAD to be just plain “color”.

---

<div class="post-metadata">

### Author: ![NeverStopTheCoder](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/neverstopthecoder/32/21194_2.png) [@NeverStopTheCoder](https://forum.makecode.com/u/NeverStopTheCoder)
#### Post date: [March 18, 2026, 4:26am UTC](https://forum.makecode.com/t/how-to-make-a-color-parameter/42709/12 "2026-03-18T04:26:19Z")

</div>

well not the parameter can be anything like

//% hotdog.shadow=“colorindexpicker”

//% paper.shadow=“colorindexpicker”

//% YamJam.shadow=“colorindexpicker”

export function name of your block(hotdog: number,paper: number,YamJam: number): void {

}

---

<div class="post-metadata">

### Author: ![YamJam](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yamjam/32/29681_2.png) [@YamJam](https://forum.makecode.com/u/YamJam)
#### Post date: [March 19, 2026, 12:37am UTC](https://forum.makecode.com/t/how-to-make-a-color-parameter/42709/13 "2026-03-19T00:37:20Z")

</div>

Well, I found that out from your post earlier!
