Select color of filter effects

i use hypes filter-effect for a color-slider. by clicking the circle the just selected color should be selected.
it works with “element.style.backgroundColor” simply javascript. but then only the first set color is selected,
not the color, where the slider stops.
“setProperty” also doesn´t work.
is there a special javascript-tag to check the color out of the filter-effects?
colorShapeSlider.hype.zip (19,7 KB)

1 Like

The issue you are having is you are not changing the background colour.

You are changing the hue.

What you can do is change the filter which has the hue attribute inside of the element also. You may find a cross browser way but tested in my Safari, Chrome and FF.

element.style.backgroundColor = malen.style.backgroundColor; 
element.style.filter = malen.style.filter;
3 Likes

great! thank you @MarkHunte! didn´t know i can use “.filter” - till now. :wink:

1 Like