* docs: Exceptions where pure white/black are allowed * docs: Outline, style, fixes. * Update rools/work README. * Reorder and reword. * Typo fixes. * Distinguish between base and foreground colours - They have very different usage patterns - Gets us thinking about contrast and accessibility ;) * Try to distil useful rules for base and fg colour selection: - Former apparent black and white requirement as lightness limits - Pure white is "widely accepted", or widely used at least - Pure black is almost never used though (surprised me, but true) * Add loads of example icons from Papirus itself. * Mention "paper" shade as a suggested meterial colour * Clarify margins and "design to" areas * Document how shadows and highlights are made in detail. * Remove language about a palette because there isn't any official one. * Improve wording. * Split out the design notes, fix main README links.
4.9 KiB
For Developers and Designers
Designing icons for Papirus is easy :)
You only need to draw icons for Papirus and then convert colors for ePapirus, Papirus Dark and Papirus-Light using our scripts.
How to draw icons for Papirus
See the separate Design Notes document, and the Papirus wiki.
System Requirements
The scripts in this folder require the following programs:
- Inkscape
- scour
For Debian/Ubuntu/Linux Mint users:
sudo apt update
sudo apt install inkscape python3-scour
If you need a more recent version of scour, please install it with pipx.
Step-by-Step Guide
1. Getting Started
Open the tools/workfolder in a file manager and open a terminal in that location. You can do that from the context menu entry Open in Terminal or Action → Open Terminal Here.
1a. How to create a new icon
You can create a new icon from the provided template using the new-icon.sh script in tools/work. For example,
$ cd tools/work
$ ./new-icon.sh apps abricotine
'./Papirus/apps/_TEMPLATE@16x16.SVG' -> './Papirus/apps/abricotine@16x16.svg'
'./Papirus/apps/_TEMPLATE@22x22.SVG' -> './Papirus/apps/abricotine@22x22.svg'
'./Papirus/apps/_TEMPLATE@24x24.SVG' -> './Papirus/apps/abricotine@24x24.svg'
'./Papirus/apps/_TEMPLATE@32x32.SVG' -> './Papirus/apps/abricotine@32x32.svg'
'./Papirus/apps/_TEMPLATE@48x48.SVG' -> './Papirus/apps/abricotine@48x48.svg'
'./Papirus/apps/_TEMPLATE@64x64.SVG' -> './Papirus/apps/abricotine@64x64.svg'
This command has created six new working files inside the work directory from the template files. For all new icons, please stick to using the template. It is necessary because the template already has some needed objects, like a CSS stylesheet.
1b. How to edit an existing icon
If you want to modify an existing icon, you can do that using the get-from-theme.sh script. For example,
$ cd tools/work
$ ./get-from-theme.sh panel transmission-panel.svg
'./../../Papirus/24x24/panel/transmission-panel.svg' -> './Papirus/panel/transmission-panel@24x24.svg'
'./../../Papirus/16x16/panel/transmission-panel.svg' -> './Papirus/panel/transmission-panel@16x16.svg'
'./../../Papirus/22x22/panel/transmission-panel.svg' -> './Papirus/panel/transmission-panel@22x22.svg'
.svg
1c. How to make symlinks to an existing icon
This is an example of how you might fix issue #354. First, make sure there's an existing icon you can link to:
$ cd tools/work
$ find ../../Papirus -type f -iname '*ardour*' -print
./Papirus/16x16/apps/ardour.svg
./Papirus/22x22/apps/ardour.svg
./Papirus/24x24/apps/ardour.svg
./Papirus/32x32/apps/ardour.svg
./Papirus/48x48/apps/ardour.svg
./Papirus/64x64/apps/ardour.svg
Now you have the filename of an existing icon, ardour.svg, and the name of the new symlink from #354, ardour5. Create the symlinks with the command:
$ cd tools/work
$ ./new-symlink.sh --help # this shows usage
$ ./new-symlink.sh apps ardour.svg ardour5
'./Papirus/apps/ardour5@16x16.svg' -> 'ardour.svg'
'./Papirus/apps/ardour5@22x22.svg' -> 'ardour.svg'
'./Papirus/apps/ardour5@24x24.svg' -> 'ardour.svg'
'./Papirus/apps/ardour5@32x32.svg' -> 'ardour.svg'
'./Papirus/apps/ardour5@48x48.svg' -> 'ardour.svg'
'./Papirus/apps/ardour5@64x64.svg' -> 'ardour.svg'
NOTE: Symlinks will look like they're broken, but that's OK.
If your symlinks are in apps, emblems or mimetypes you can continue from step 4.3, else continue from step 3.
IMPORTANT: Please don't remove suffixes from the filename, as it's needed for other scripts. Filename extension must be in lowercase.
2. Papirus
IMPORTANT: You should draw icons for the core Papirus theme first.
- Open the created/copied file in Inkscape.
- Delete any objects you do not need.
- Draw new objects.
- Save the file with the same filename.
- Repeat it for other sizes.
3. Papirus Dark, Papirus Light and ePapirus
-
Run
convert.sh. It copies needed icons fromwork/Papirustowork/Papirus-Dark,work/Papirus-Light, andwork/ePapirus. It then updates the copies' color schemes.$ cd tools/work -
Check the result, and edit manually if needed.
4. Final Steps
-
Run script
tools/work/prepare.shto clean the created icons:$ ./prepare.sh -
Please check your icons again.
-
If everything is fine then put the icons into main icon theme folders:
$ ./put-into-theme.sh -
Clean the
workdirectory:$ ./clean.sh -
Run tests:
$ make test -
Everything is ready now! You can commit the changes to GitHub.