# Changing rgbPicker color from code?

**URL:** <https://forum.electromage.com/t/changing-rgbpicker-color-from-code/2827>\
**Category:** Patterns and Code\
**Created:** [March 3, 2023, 5:03am UTC](https://forum.electromage.com/t/changing-rgbpicker-color-from-code/2827 "2023-03-03T05:03:27Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![zranger1](https://forum.electromage.com/user_avatar/forum.electromage.com/zranger1/32/301_2.png) [@zranger1](https://forum.electromage.com/u/zranger1)\
**Post date:** [July 16, 2023, 1:46am UTC](https://forum.electromage.com/t/changing-rgbpicker-color-from-code/2827/6 "2023-07-16T01:46:08Z")

</div>

As far as I know, you can’t set the saved/displayed value of any control from pattern code right now. I wish you could. It’d be a useful improvement, and maybe we’ll see it in a future version.

There’s some discussion about controls, and issues around saving/restoring persistent variables from patterns in general here:

> [@Save/persist variables](https://forum.electromage.com/t/save-persist-variables/1735/9):
>
> @wizard, not in front of a PB, or I’d test… What happens if you invoke the sliderMySlider function with a value inside a pattern explicitly? Does it: A) call the function? B} change the UI to match?

---

_[View the full topic](https://forum.electromage.com/t/changing-rgbpicker-color-from-code/2827)._
