Update developer docs for SVG add-on logos (#2273)

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
pull/2274/head
Florian Hotze 2024-03-13 20:53:37 +01:00 committed by GitHub
parent 59d9289179
commit a91eac17e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 14 additions and 7 deletions

View File

@ -55,23 +55,30 @@ mvn spotless:apply
Re-run the build to confirm that the checks are passing. Re-run the build to confirm that the checks are passing.
If it does, it is time to [contribute your work](../contributing.html)! If it does, it is time to [contribute your work](../contributing.html)!
# Add your add-on's logo to the openHAB website # Add your add-on's logo to the openHAB website and the UI
After your pull request has been merged and the next openHAB version is released, your add-on will be available in the addons search on the openHAB website with a default logo. After your pull request has been merged and the next openHAB version is released, your add-on will be available on the openHAB website and in the UI's add-on store with a default logo.
You can upload a logo to display it on the openhab.org start page, the addon search and in the readme. You can upload a logo to display it on the openHAB website (start page, add-on search and readme) and the UI.
These are the requirements for logos: These are the requirements for logos:
- SVG
- Less than 10 kB
In case you don't have an SVG version of the logo, you can instead provide a PNG version, these are the requirements for PNG logos:
- PNG (transparency is preferred) - PNG (transparency is preferred)
- 512x512 pixels or smaller in one dimension, if it's not a square logo - 512x512 pixels or smaller in one dimension, if it's not a square logo
- Less than 30kB - Less than 30kB
File size is key as the website displays hundreds of small logos on the same page. File size is key as the website displays hundreds of small logos on the same page:
To shrink the file size, save your logo with Palette-Based Colors (sometimes called "Indexed-RGBA").
SVG logos should normally be less than 10 kB, in case they are not, you may be able to shrink the file size be importing the SVG logo into a vector graphics software, e.g. Affinity Designer, and export it with a preset for small size.
To shrink the file size of PNG logos, save your logo with Palette-Based Colors (sometimes called "Indexed-RGBA").
Also, JPEG compression artifacts from prior conversions or halo around the logo increases file size dramatically. Also, JPEG compression artifacts from prior conversions or halo around the logo increases file size dramatically.
There are online converters to convert your True Color PNG logo to Palette-Based Colors. E.g. <https://compresspng.com/>. You may use online converters to convert your True Color PNG logo to Palette-Based Colors, e.g. <https://compresspng.com/> or use zopflipng: `zopflipng -m --filters=0me --lossy_8bit --lossy_transparent -y logo.png logo.png`
Or use zopflipng: `zopflipng -m --filters=0me --lossy_8bit --lossy_transparent -y logo.png logo.png`
_After_ your binding's pull request has been merged, you can upload your logo by filing another pull request to the [openhab-docs/images/addons/](https://github.com/openhab/openhab-docs/tree/main/images/addons) repository. _After_ your binding's pull request has been merged, you can upload your logo by filing another pull request to the [openhab-docs/images/addons/](https://github.com/openhab/openhab-docs/tree/main/images/addons) repository.
Your logo will be available after the next website build. Your logo will be available after the next website build.