COLOR PICKER - How to use in a custom Block?

How does one get a color picker in a custom block as a parameter ?

Also, related question:

I tried combining "set pen color" and "report RGB" blocks to arrive at a custom block to select a color and getting its RGB values in one step, but was not able to.

image Did not work !
I tried to ringify the pen color block without success.

My desired block:

Also, it does not report RGB ???
But the report block outside of the custom definition does report RGB !

There's a bug in snap! that means you can't put reporters in a colour input. To make the block, just open long form input dialog and change it to colour.

Edit: Why do your screenshots have a colour picker in the block definition? Is that a bug on my side at

Thanks @spaceelephant. Exactly what I needed.

I made a script to fix the bug. Same project works. The script is too big to be a literal. It's also too big to view by clicking. Try saving it to a txt or js.

Sorry, I did not notice the question about the color picker block in the header.
I did that to illustrate what I was trying to do.
I could not find a way to use the color picker as a parameter in the block.
I tried your answer about the "long form input dialog", but could not locate the "color" option.
Probably I did not do something quite the right way.
Anyway, since your blocks do exactly what I needed, it was very helpful.
Still I would like to find out how to get that picker into the block header.

Fixed. Kind of. The colour works though if you add the script. I hadn't noticed that bug, but I can reproduce it. I should really file a bug report.

If you want to try my library it should help.
It lets you get and set pen colors also.
It also offers ways to get color values.
Color Blocks

As for how to get it in a block directly, it requires a bit of tinkering but you can try duplicating my block or i can show you how to make it in an easy way.