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:
		
					parent
					
						
							
								81ced7369d
							
						
					
				
			
			
				commit
				
					
						36bef61f2e
					
				
			
		
					 3 changed files with 13 additions and 44 deletions
				
			
		| 
						 | 
				
			
			@ -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:
 | 
			
		||||
  - Add‑on 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).
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" data-attribution="cc0-icons" viewBox="0 0 24 24">
 | 
			
		||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="#F5A623" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" data-attribution="cc0-icons" viewBox="0 0 24 24">
 | 
			
		||||
  <path d="M13.2 16.2 16 19m-2-5a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm0-12v6h5"/>
 | 
			
		||||
  <path d="M15 2H6.5c-1.09 0-2 .91-2 2v16c0 1.09.91 2 2 2h11c1.09 0 2-.91 2-2V7.5L15 2Z"/>
 | 
			
		||||
</svg>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
		 Before Width: | Height: | Size: 385 B After Width: | Height: | Size: 380 B  | 
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue