refactor(icons): remove color injection; set emphasis stroke directly in SVG\n\n- stroke set to #F5A623 in icons/file-search.svg\n- build script now rasterizes SVG as-is using ImageMagick only\n- docs updated to reflect new flow

This commit is contained in:
Jordan Wages 2025-08-24 01:47:13 -05:00
commit 36bef61f2e
3 changed files with 13 additions and 44 deletions

View file

@ -14,14 +14,9 @@ Run `npm run build` (or `npm run build:icons`) to regenerate. The manifest is wi
Notes
-----
- Source: `icons/file-search.svg` uses `stroke="currentColor"`.
- The build script replaces `currentColor` with configured colors and rasterizes with a transparent background. It also injects explicit `stroke`/`fill` on each path for better compatibility across renderers.
- Default stroke colors use the project emphasis palette:
- Addon icons (48/96/128): Primary 2 (deep) `#223544`.
- Toolbar icons (16/32): Primary 1 (light) `#5AC3D6`.
- Customize via env vars when building:
- `ICON_COLOR_ADDON` (48/96/128); default `#223544`.
- `ICON_COLOR_TOOLBAR` (16/32); default `#5AC3D6`.
- Source: `icons/file-search.svg` defines the exact stroke color (an emphasis color) directly in the SVG.
- The build script does not inject or replace colors; it rasterizes the SVG as-is to transparent PNGs using ImageMagick.
- To change the icon color, edit the `stroke="#..."` attribute in `icons/file-search.svg`.
- Firefox does not require .ico; PNG is recommended.
- Theme variants can be added later via `browser_action.theme_icons`.
- Rasterizer: uses ImageMagick only (`magick` or `convert`). Ensure your ImageMagick build supports reading SVG (via `librsvg` or compatible delegate).
- Theme variants can be added later via `browser_action.theme_icons` if desired.
- Rasterizer: uses ImageMagick only (`magick` or `convert`). Ensure your ImageMagick build supports reading SVG (via `librsvg` or a compatible delegate).