ypid/latex-packages

Colors in images

rodrigoalcarazdelaosa opened this issue Β· 8 comments

I have noticed that the black and white in the CC images are not pure black (#000000) and pure white (#FFFFFF), as it should be (the original images found in CC have perfect black and white).

Could this be corrected?

Thanks in advance!
Rodrigo

ypid commented

Thanks for reporting. How did you notice? I am not able to reproduce this finding. I opened doclicense-CC-zero.{eps,pdf} in Inkscape, all good. Then I opened the files with Evince and took a screenshot with Gimp. Also perfect white and black.

I just downloaded one of the images, this one from example (https://osl.ugr.es/CTAN/macros/latex/contrib/doclicense/images/doclicense-CC-by-sa.pdf) and measure its color with the built-in Digital Color Meter from macOS. In your image, black is #0A0B09 and white is #FFFFFE, and the grey is #A3AAA0, whereas in the corresponding official image (https://mirrors.creativecommons.org/presskit/buttons/88x31/png/by-sa.png) black is #000000, white is #FFFFFF and grey is #A9B2AC, everything measured in sRGB.

ypid commented

Now I can reproduce it. Seems that epstopdf had a bug. I did not research what it was. I regenerated all eps and pdf files now using https://mirrors.creativecommons.org/presskit/buttons/88x31/svg/ as source with Inkscape.

As before, you don’t have to trust mine images. The commands to generate them are provided as Makefile which ensures reproducibility. Something that everyone should care for.

Please test #49 and report back. You can copy the files into your local texmf tree.

One last question remains: How did you notice this small color offset πŸ˜‰ ? It has gone unnoticed for years. Apparently Apple users care even more about the aesthetics than regular LaTeX users. Well done πŸ‘

Hi again, I'm sorry but I'm afraid I don't really know how to test #49. I just updated to TeX Live 2020 and noticed there was an update for doclicense. That version still produces the same images with not pure black and white (and different grey) so probably still doesn't have this fix. I also downloaded all the files from GitHub (https://github.com/ypid/latex-packages.git) but I'm not sure what to do next.

Just to be clear. Once I have loaded the package with the options I want (by the way, shouldn't the default license be version 4.0 instead of 3.0?), if I want to put the image of the license I should use \doclicenseImage right?

As for how I noticed this small color offset, I was just preparing a document and wanted to use exactly the same grey as in the license image for some background (I'm a bit of a color ---and perfection--- freak). I opened the Digital Color Meter (great tool that comes with macOS) and hovered the cursor over the image and noticed that when I was in the black zone the color wasn't #000000 as I was expecting (same thing happened with the white). At the beginning I thought maybe the original image wasn't using perfect black and white but then I checked them and that's how I noticed it :-).

Thanks!
Rodrigo

The latest version of the documentation found in CTAN (http://mirrors.ctan.org/macros/latex/contrib/doclicense/doclicense.pdf) also has the same offsets in the colors πŸ˜‰

Now I can reproduce it. Seems that epstopdf had a bug. I did not research what it was

Funnily enough, If I open the EPS files with macOS Preview, it automatically converts them to PDF and the color is also wrong. I don't know how Preview is performing the conversion, but epstopdf uses Ghostscript. It surely has to do with color conversions, but no idea right now.

Hi again, I'm sorry but I'm afraid I don't really know how to test #49.

Forget this. I was able to download the latest version of your project from here and checked that all the images are fine now. I also noticed your Inkscape hack to generate the eps and pdf images from the svg source. I guess it's the same thing the svg package does, isn't it?

Thanks for your time,
Rodrigo

ypid commented

Sorry for my delay.

I just updated to TeX Live 2020 and noticed there was an update for doclicense.

Not yet released/nor uploaded the fixed images. That release you noticed was done like one hour before you opened this issue :)

I will make a new release in a few weeks.

if I want to put the image of the license I should use \doclicenseImage right?

Yes. What does the documentation say :) ?

I also noticed your Inkscape hack to generate the eps and pdf images from the svg source. I guess it's the same thing the svg package does, isn't it?

Peeking at the svg package source confirms this. Ref: https://github.com/mrpiggi/svg/blob/master/source/svg.dtx Thanks for the hint. So it seems I have found a solution that also other people have come up with.

Thanks for the story on how you found it. And it makes me think how Free and Open Source Software projects can become really high quality and battle tested over time because there is a will to address all the issues. Not like in some business software where bugs or vulnerabilities are only closed when the pressure becomes so high on that company. And of course users that report bugs, so thank you very much.