Topic: Colors Besides PostID Under Recent Changes for Posts

Posted under General

They say it's meaningless but I still see patterns. Someday I may figure it out :D

Updated by anonymous

Makes it a little easier to identify the same picture, perhaps.

Updated by anonymous

Kald said:
It's a color corresponding to the hexa code given by the post ID, or something close.

Very close. The math seems to be:

ZZ = post_id % 256
YY = (post_id / 256) % 256
XX = (post_id / 65536) % 256

blue = XX
green = (YY + blue) % 255
red = (ZZ + green + blue) % 255

(If you understand how hexadecimal works, you'll see that for any six digit hexadecimal code like 0x123456, that basically reads as 0xXXYYZZ)

So post 0x010101 (post #65793) ends up as red 3, green 2, blue 1).

Because of the math, the closest to "yellow" is post 0x00fe00 (post #54024), which ends up with red 254, green 254, blue 0. Post 0x00fe01 (post #54025) ends up with red 0, green 254, blue 0. Post 0x00ff00 (post #65280) ends up with red 0, green 0, blue 0.

What will happen at post 0x1000000 (post #16777216)? I have no idea. I think if e621 is still around at post 16 million, it'll be part of some future dystopian furry megacorporation and will be running on a different base of code. At least we'll finally have real catgirls then (I'm hoping for post #68646), and I retain every confidence that they'll be smoking hot.

Updated by anonymous

WolfieWolfie1992 said:
Oh man, something so simple as colors, is actually quite complicated! xD

Well, the two things I find odd about it are adding together color values, which seems like shifting the color values assigned to posts for mysterious reasons, and modding each color by 255 instead of 256. Color components are 0-255, inclusive, and modding by 255 reduces the used range of values to 0-254, and also introduces color re-use because you're basically mapping a range of 256 values into a space of 255 values.

A mystery.

Also, if anyone actually cares, I realize that I fudged the math. Given the XX, YY, and ZZ from above, the correct math for colors is:

blue = XX
green = (XX + YY) % 255
red = (XX + YY + ZZ) % 255

Also, it's reasonable to believe that blue could be "XX % 255", similar to the other two color components, but by the time we hit the post count necessary to know for certain, I hope to be snuggling with my pet catgirl.

Updated by anonymous

  • 1