# Color Slider Vision

**URL:** <https://forum.inductiveautomation.com/t/color-slider-vision/60297>\
**Category:** Ignition\
**Tags:** ignition81, vision, scripting\
**Created:** [June 2, 2022, 1:31pm UTC](https://forum.inductiveautomation.com/t/color-slider-vision/60297 "2022-06-02T13:31:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![gpellicelli](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/gpellicelli/32/53466_2.png) [@gpellicelli](https://forum.inductiveautomation.com/u/gpellicelli)\
**Post date:** [June 2, 2022, 1:31pm UTC](https://forum.inductiveautomation.com/t/color-slider-vision/60297/1 "2022-06-02T13:31:55Z")

</div>

Hi every one,

Am not very good in java and everything and I got a problem using the slider o vision module. I want to change the color of every thing in that componant… Like actually in the designer you can change Foreground and Background but you dont have acces to the Track color,Thick color Back Track color and the shape and color of the slide properties.

Do you know if there a way to edit that.

Best regard,  
Gabriel

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/e/1e17683f526b2fb24044656d666d24a3fd9bb445.png)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [June 2, 2022, 2:33pm UTC](https://forum.inductiveautomation.com/t/color-slider-vision/60297/2 "2022-06-02T14:33:12Z")

</div>

In theory:

> **[Synthetica - Java Look And Feel](https://www.jyloo.com/synthetica/customize/#JSlider)**
>
> Jyloo Software is a leading Java Look and Feel and Swing component provider. Based on Java Swing technology, Jyloo, JAVASOFT software products are user friendly, come along with a modern look, provide consistency and a high grade of customizability.

In practice:  
This probably won’t work.

---

<div class="post-metadata">

**Author:** ![gpellicelli](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/gpellicelli/32/53466_2.png) [@gpellicelli](https://forum.inductiveautomation.com/u/gpellicelli)\
**Post date:** [June 2, 2022, 3:05pm UTC](https://forum.inductiveautomation.com/t/color-slider-vision/60297/3 "2022-06-02T15:05:43Z")

</div>

Thanks you for the answer and in “Theory”. How can you do that on the componant? Via a script? Property change ? How the script look like

Best regards  
Gabriel

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [June 2, 2022, 3:26pm UTC](https://forum.inductiveautomation.com/t/color-slider-vision/60297/4 "2022-06-02T15:26:16Z")

</div>

Those are client properties, so in some scripting hook (maybe a property change event filtered to `componentRunning`, you would do something like:  
`event.source.putClientProperty("Synthetica.slider.hoverAndPressed.enabled", True)`

There’s also UIManager properties available for customization, although which ones are actually respected is its own complicated subject. Customizing the appearance of Vision applications is a fragile, messy, sometimes outright impossible rabbit hole. It’s _far_ easier to simply say no. (Or, embrace the use of e.g. the Paintable Canvas and make your own implementation, if you really want).

I think @dkhayes117, maybe, was doing some pretty neat stuff with UIManager keys. He may have more specific advice for 8.X stuff, if he’s willing/able to share.

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [June 2, 2022, 7:38pm UTC](https://forum.inductiveautomation.com/t/color-slider-vision/60297/5 "2022-06-02T19:38:34Z")

</div>

The only UIManager key I could get to work is tick color. You could set the background of the slider to transparent inside a template and add a rectangle behind it to control that color, kind of hacky though.

```auto
from javax.swing import UIManager
from java.awt import Color

color = Color(0,0,0)
UIManager.put('Slider.tickColor',color)

```

Here is a script to inspect UIManager default keys

```auto
from javax.swing import UIManager
keys = list(UIManager.getDefaults().keys())
for key in keys:
	if 'Slider' in str(key): 
		print key

```

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [September 14, 2022, 9:49am UTC](https://forum.inductiveautomation.com/t/color-slider-vision/60297/6 "2022-09-14T09:49:02Z")

</div>

This is an older thread, but this came up again. I did a tutorial in the newer thread, that shows a possible way to approach this problem using layered shapes and scripting. Here is the link:  
[Slider Object customization](https://forum.inductiveautomation.com/t/slider-object-customization/64005)
