https://vole.wtf/clone-a-lisa/

@VOLEwtf this is brilliant, even if my rendition isn't.

Though on Firefox I had to load the website without cache (ctrl+shift+f5) to get it to work after the first time, otherwise all my brush strokes were solid black (not black from the palette, but RGBA 0 0 0 0)

#webtoys #fun #silly

Clone-a Lisa 🎨⏱️ art forgery game

One minute to copy Leonardo da Vinci’s Mona Lisa.

VOLE.wtf
@kroltan Hi, do you have any add-ons installed that might change page colours, e.g. to force dark mode?
@VOLEwtf I have Dark Reader, but it is not enabled for this website.
@kroltan Did all the paint buttons also look black? I've seen Dark Reader mentioned elsewhere as causing similar sounding problem, bit odd if not enabled though

@VOLEwtf I got it to happen again, but no errors on the console and the only web requests that failed was Fathom being uBlocked.

It could still be caused by Dark Reader though, as I had to enable and disable it, then reload the page.

Maybe on first visit DR starts mucking about with the page before it detects the already existing dark theme realises it shouldn't?

But then again, it stays broken on every subsequent visit unless I clear the cache.

@kroltan The paint colour gets read from the style attribute on those paints, so it's odd if they're looking OK but painting breaks. Maybe the precise way the colour is specified gets altered, might create a duplicate attribute to read from

@VOLEwtf Good pointer, it does indeed seem that DR leaves some muck in the style attributes even though it is off, that's awful lol.

Not sure how exactly you're reading the colours, since they seem to still be in there. In theory if you use swatchElement.style.backgroundColor it ought to return the correct value regardless, are you maybe reading the textual representation of the style attribute itself and the extra cruft breaks it?

@kroltan Reading the CSS attribute seemed riskier as it's open to subtle browser differences. I've just added extra data-rgb attributes & switched the scripting to read those, hopefully fixes your issue

@VOLEwtf Also thanks for the debugging session, I really appreciate web toys and tiny games like this existing at all, so please don't feel like you have to make it work in every weird configuration out there if you don't want to.

The quirky internet always has its quirks 😄