openmoji icon indicating copy to clipboard operation
openmoji copied to clipboard

Opacity in OpenMojis

Open carlinmack opened this issue 5 years ago • 10 comments

I just discovered there is some transparency here:

image

I'm going to try see if I can write a script to collate all the examples of transparency so that we can discuss if and where transparency is allowed

carlinmack avatar May 21 '20 17:05 carlinmack

import os
import re

svgs = set()

for subdir, dirs, files in os.walk("src"):
    for file in files:
        # print os.path.join(subdir, file)
        filepath = subdir + os.sep + file
        if filepath.endswith(".svg"):
            with open(filepath) as file:
                if "opacity" in file.read():
                    svgs.add(filepath)

print("SVGS:\n" + "\n".join(list(svgs)) + "\n")
Path Image
src/activities/sport/26BE.svg image
src/activities/game/1F3B1.svg image
src/activities/sport/1F3B3.svg image
src/extras-openmoji/food-drink/E0C4.svg image
src/extras-openmoji/objects/E149.svg image
src/extras-unicode/symbol-other/2B2E.svg image
src/extras-unicode/symbol-other/2B21.svg image
src/extras-unicode/symbol-other/2BC4.svg image
src/extras-unicode/symbol-other/2B23.svg image
src/extras-unicode/symbol-other/2B22.svg image
src/extras-unicode/symbol-other/2B1F.svg image
src/extras-unicode/symbol-other/2B2F.svg image
src/extras-unicode/symbol-other/2B20.svg image
src/extras-unicode/symbol-other/2BC3.svg image
src/flags/country-flag/1F1E9-1F1F2.svg image
src/flags/country-flag/1F1E6-1F1EB.svg image
src/food-drink/food-prepared/1F9C6.svg image
src/people-body/hand-fingers-partial/1F91E.svg image
src/people-body/hands/1F91D.svg image
src/travel-places/sky-weather/26F1.svg image
src/travel-places/sky-weather/1F31D.svg image
src/travel-places/sky-weather/1F31A.svg image

carlinmack avatar May 21 '20 17:05 carlinmack

Sorted all but these which should be discussed:

Path Image
src/activities/game/1F3B1.svg image
src/extras-openmoji/food-drink/E0C4.svg image
src/extras-openmoji/objects/E149.svg image
src/travel-places/sky-weather/26F1.svg image
src/travel-places/sky-weather/1F31D.svg image
src/travel-places/sky-weather/1F31A.svg image

carlinmack avatar May 21 '20 17:05 carlinmack

@fuddl could you add a

find: fill-opacity="0"
replace: fill="none"

type thing to your figma clean-up script? they're equivalent but it would be nice to keep it consistent 👍

carlinmack avatar May 21 '20 18:05 carlinmack

@carlinmack Many thanks for spotting! Will add a new test for it in the next days ...

b-g avatar May 22 '20 06:05 b-g

I think we should add the test after we discuss what to do about the 6 remaining emojis

carlinmack avatar May 24 '20 18:05 carlinmack

@dnlutz Can you advice how to get rid of the transparency at the last 6 remaining emojis?

Path Image
src/activities/game/1F3B1.svg image
src/extras-openmoji/food-drink/E0C4.svg image
src/extras-openmoji/objects/E149.svg image
src/travel-places/sky-weather/26F1.svg image
src/travel-places/sky-weather/1F31D.svg image
src/travel-places/sky-weather/1F31A.svg image

b-g avatar May 25 '20 14:05 b-g

I had to apply "Aussehen umwandeln" in Illustrator (cmd + shift + U). After that the transparency of the elements can be changed to 100 percent. transparency.zip

dnlutz avatar May 25 '20 14:05 dnlutz

not so simple, you agree this looks bad? image I would suggest we remove the shadow in some

carlinmack avatar May 25 '20 14:05 carlinmack

Yes that's a good idea. Otherwise we'd have to define an additional grey tone – the lighter grey is definitely too light.

dnlutz avatar May 25 '20 15:05 dnlutz

import os
import re

svgs = set()

for subdir, dirs, files in os.walk("src"):
    for file in files:
        # print os.path.join(subdir, file)
        filepath = subdir + os.sep + file
        if filepath.endswith(".svg"):
            with open(filepath) as file:
                if "opacity" in file.read():
                    svgs.add(filepath)

print("SVGS:\n" + "\n".join(list(svgs)) + "\n")

Hello @carlinmack . Sorry if I am a bit off-topic, but in situation like this, you can achieve this kind of recursive search of patterns through text files, with more simpler tools like grep instead of relying on Python script.

In this case something like grep -rl opacity src

Hope it helps.

Cheers

Delapouite avatar Sep 03 '21 13:09 Delapouite