WesleyBranton / Custom-Scrollbar

Give your internet browser a personal touch with customized scrollbars!
https://customscrollbars.com
Mozilla Public License 2.0
97 stars 9 forks source link

Allow website to override color of ONLY THUMB or ONLY TRACK #220

Open e-t-l opened 1 year ago

e-t-l commented 1 year ago

In the settings for "Allow website to override," could the only color radio option be split into 3 options: thumb and track colors, only thumb color, and only track color? (Maybe also a checkbox for do not override alpha values?)

Use case: I like the clean look of having a completely transparent scrollbar track, and a semi-transparent thumb. I would be fine with a website overriding the color of the thumb to better match the site theme, but I would always want the track to be 100% transparent.

(An additional enhancement, though I don't know if this would be harder to implement, would be to allow/disallow the website overriding the color hue values but not transparency/alpha values. Example use case: My default thumb is gray and 50% transparent, aka HSVA(0,0,50,50). A purple-themed website might override the thumb to be purple, but its alpha value would remain, aka HSVA(100,0,100,50). Incidentally, the retain-alpha-values enhancement by itself would address my personal use case of always wanting a transparent track. To serve the most users, though, both of these suggestions should be considered.)

WesleyBranton commented 1 year ago

This feature would only be possible for Chrome browsers, since Firefox sets the two colours in a single value. Allowing a website to only override the alpha value would not be possible in any browser.

I do like the idea of having more control over what websites can override though.

e-t-l commented 1 year ago

Ah, I am on Firefox. What does setting both colors in one value look like? Is it possible to read the value that the website wants to set, extract the relevant color data (e.g. the thumb color value), then use it to write a new combined-value that's passed to the browser?