Have you ever wondered what color something is that you're trying to tag? And then got stuck trying to decide between tan/brown, red/pink, black/grey and other very similar tones?
Well if you haven't, I sure have. That's why I made this userscript to assist me in tagging colors in images. Colors often go untagged, but we want to provide the easiest searchability ever, so tagging something like a color of a character can be important.
The colors I have grouped are only the colors available from the tag group:colors wiki, other than blonde, which is a hair color only and would hurt yellow detection.
- After discussion in the discord, silver and gold were removed as well, as these conflate with grey and yellow. All of their data has been put under grey and yellow, respectively.
Important Note
This tool is merely a second opinion, and while in general it is right, there can be mistakes. Do not use this tool as a replacement for your brain. Unless you're colorblind, then this might help a lot.
Furthermore, you can "train" the dataset if you disagree with the top-most color picked, you can click on the color you believe it is and it will add the color into the dataset to be used in all future evaluations. However, you can't currently undo that without some amount of knowledge of how to edit the script, so use with caution.
The default dataset was taken from multiple websites and then tested and hand modified by myself to usually give the right color at the top most of the time.
Download guide:
1. Download tampermonkey for whatever browser you're using.
2. Click here
3. Click install
For an example video, see here
Full source code: https://gist.github.com/DontTalkToMeThx/d8f5522a2b63cea9afa71d3c96730ae3#file-e621colortaghelper-user-js
Usage guide
This tool works on the upload page, or the post edit page, and all you have to do is mouse over the image, this will show a little box with the color of the pixel your mouse is currently on, and then click to show the color scores. The colors are sorted by their score, where a lower score is better.
If you disagree with the evaluation, click on the color you believe it to be, and that will add the color to the dataset, which will cause your color model to be better.
When you click on the image, your pixel color will stop updating, to have it update again, press shift while mousing over the image. You don't need to hold shift, but you can if you want. Click in another area to do another evaluation, and become the best color tagger on e621.
If you click and drag you can lasso select a region in an image and get the average color instead of a single pixel.
This tool will not add tags for you, it just tells you the color it believes to be the closest to the color you clicked on. You combine that with color_feature as in pink_fur, or brown_hair.
If you find any color mistakes that are big enough to warrant a change to the default color list, let me know. The script does support updating the list without losing your custom data.
The most common mix up is tan and brown since tan is just a pale brown, it's typically depicted as lighter than brown, but some tan color choices are darker. You may need to go to posts which are properly tagged and add more data for tan and brown yourself using the train feature.
I may spend a few hours going through posts and adding them to the dataset and then releasing the dataset in the future, but I didn't have the time to do that when I originally made this, so I just took the data from a bunch of websites which was easy enough to automate. After that I just ensured it was right at least most of the time, or that its mistakes weren't entirely common. It really likes to say that eevee's fur is tan, and that its mane is white, when most people would say that they are brown and tan, respectively.
Notes
- Translucent overlays such as disembodied things and ghost things blend the color behind them, messing up the overall color of the pixel. This is unavoidable, and you'll just have to use your best judgement. I do not recommend adding any color data when you clicked on a translucent object.
- This also applies to other color blends, such as blush, which can blend with the body color itself, although to a lesser degree. It may be able to properly extract them with good enough data, but I wouldn't recommend adding them.
- Shadows can cause some colors to appear like other colors, and that will also mess with this as well since it uses L*a*b* which is perceptual.
- If the size of the image changes for whatever reason after loading, your mouse offset will be wrong. This happens because I draw the image to an invisible canvas with the on load width and height and translate mouse position on the image to mouse position on the invisible canvas
In the future I want to get a lasso tool to select a group of pixels and average out the color before computing the color group, but I was unsure of how to do this.
Updated