# How to make a color picker block

**URL:** <https://forum.makecode.com/t/how-to-make-a-color-picker-block/29513>\
**Category:** Help\
**Tags:** extension\
**Created:** [June 29, 2024, 9:47pm UTC](https://forum.makecode.com/t/how-to-make-a-color-picker-block/29513 "2024-06-29T21:47:59Z")\
**Posts on this page:** 3\
**Page:** 1

<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 29, 2024, 9:47pm UTC](https://forum.makecode.com/t/how-to-make-a-color-picker-block/29513/1 "2024-06-29T21:47:59Z")

</div>

Hello! 😁

> **I tried adding a color picker block that lets you choose a color without having to input a number ...**
>
> Like this:
> 
> ![expectations](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/5/5/55858791eeba3f179c31395dfcb1bd540e8ead72.png)
> 
> However, _this_ is what I got:
> 
> ![reality](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/3/d/3d5b07ec762c816e63448a76196a80a3609128f8.png)

> **Here's my code ...**
>
> ```auto
> /**
> * Color picker
> */
> //% shim=TD_ID
> //% blockId=fancy_text__colorPicker
> //% block="$color"
> //% color.shadow=colorindexpicker
> //% group=Create
> //% weight=0
> //% help=github:arcade-fancy-text/docs/set-color
> export function __colorPicker(color?: number): number {
> return color;
> }
> 
> ```

I should mention that I’m using the “**[Fancy Text Sprite](https://github.com/riknoll/arcade-fancy-text)**” extension as a template for this because I don’t want to make a brand new extension just for this block 😅

---

<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:** [June 30, 2024, 4:38pm UTC](https://forum.makecode.com/t/how-to-make-a-color-picker-block/29513/2 "2024-06-30T16:38:23Z")

</div>

> **[GitHub - UnsignedArduino/ColorBlock: Imagine memorizing the values of the...](https://github.com/UnsignedArduino/ColorBlock)**
>
> Imagine memorizing the values of the colors in MakeCode Arcade. - UnsignedArduino/ColorBlock

😁

(Back up your code before trying to import this extension because last I remembered it caused a couple of issues for some reason even though it’s such a simple extension…no clue why…)

* * *

You can find more extensions like ColorBlock on [https://awesome-arcade.vercel.app/](https://awesome-arcade.vercel.app/) 😁 (shameless self promotion)

---

<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:** [July 1, 2024, 5:55am UTC](https://forum.makecode.com/t/how-to-make-a-color-picker-block/29513/3 "2024-07-01T05:55:05Z")

</div>

Thanks! Although _funny thing_, when I re-opened my project today my color block worked!  
I think all I needed to do was close and re-open the project 😅

The “**[Awesome arcade](https://awesome-arcade.vercel.app/)**” website is handy though so I’ll be saving that 😁
