Policy Update - Rules changes incoming for AI content - Read Here

[Userscript] Transparent Image Background Color Switch

DanielTepesKraus
Greatest Poster in the Board -
GREEN - TALK TO ME
Nightmare in the Moon - Had their OC in the 2024 Derpibooru Collab.
Roseluck - Had their OC in the 2023 Derpibooru Collab.
Elements of Harmony - Had an OC in the 2022 Community Collab
Twinkling Balloon - Took part in the 2021 community collab.
Friendship, Art, and Magic (2020) - Took part in the 2020 Community Collab
My Little Pony - 1992 Edition
Wallet After Summer Sale -
Friendship, Art, and Magic (2019) - Celebrated Derpibooru's seventh year anniversary with friends

will return
Description  
This simple script adds a “Toggle BG Color” button above all images which allows you to quickly toggle between the light theme and dark theme color for the background of the image. Handy as transparent animated gifs that use aliasing can look bad against the dark theme, and of course some images look better with a dark background. This lets you swap just the image background color itself with the push of a button.
 
By default the button will always appear in the uploader bar, but you can edit the script and change the value of “AlwaysLink” in the script to set it to only appear on images tagged transparent background or derpibooru theme illusion.
 
It In Action:  
full
 
I’ve since given this script a complete rewrite and added a slider bar feature as well. You can use these sliders to tweak the RGB values of the image’s background color and set it to anything you want. Click the down arrow beside the button and go nuts. Again, this feature can be turned off by editing he script and changing the value of “UseSliders”:  
full  
I mostly added the sliders thing out of boredom / curiosity , but let me know if you find a use for it beyond brief novelty. From what I’ve been told the sliders are only supported by Chrome, Opera, and the newest versions of Firefox, so if they cause your browser problems they can be toggled off (as stated above) or fixed by updating / changing browsers.
 
Changelog  
V1.0 – 2016/03/30 – Initial release  
V2.0 - 2017/07/23 - Script rewrite. Now works consistently on all images tagged “transparent”, “transparent background”, and “derpibooru theme illusion”  
V2.1 - 2017/07/23 - Added feature to toggle the script and changed the default setting.  
V3.0 - 2017/08/01 - Script rewrite. Added slider function.
 
Download Link  
Download  
Download (Old 2.1 version) (Kept available because why not?)
 
Disclaimer and Such  
Use at your own risk. This script does not store or access any user data. This script has been tested but may not be entirely bug free.
DanielTepesKraus
Greatest Poster in the Board -
GREEN - TALK TO ME
Nightmare in the Moon - Had their OC in the 2024 Derpibooru Collab.
Roseluck - Had their OC in the 2023 Derpibooru Collab.
Elements of Harmony - Had an OC in the 2022 Community Collab
Twinkling Balloon - Took part in the 2021 community collab.
Friendship, Art, and Magic (2020) - Took part in the 2020 Community Collab
My Little Pony - 1992 Edition
Wallet After Summer Sale -
Friendship, Art, and Magic (2019) - Celebrated Derpibooru's seventh year anniversary with friends

will return
bumping this. i gave the code a complete rewrite. it now works consistently on any image tagged “transparent”, “transparent background”, and “derpibooru theme illusion”.
 
if people like, i could also add a setting to always add the toggle bg link.  
done. people pointed out it’s handy for seeing if images need the transparent background tags to begin with.
Interested in advertising on Derpibooru? Click here for information!
Furry Body Pillows - Preset and Custom Designs

Help fund the $15 daily operational cost of Derpibooru - support us financially!

Syntax quick reference: **bold** *italic* ||hide text|| `code` __underline__ ~~strike~~ ^sup^ ~sub~

Detailed syntax guide