Color-manager icon indicating copy to clipboard operation
Color-manager copied to clipboard

Not all icons get converted

Open VKohli17 opened this issue 1 year ago • 15 comments

Some icons in icon pack stay unconverted (both monochrome and palette). green Replicate - try converting https://github.com/NicklasVraa/Color-manager/assets/66561036/bf137340-8f85-4fab-9a0c-1ddd443ba4c7, it stays in its original colors.

VKohli17 avatar Aug 14 '23 10:08 VKohli17

Will try to reproduce later this week

NicklasVraa avatar Aug 14 '23 10:08 NicklasVraa

I cannot open https://github.com/NicklasVraa/Color-manager/assets/66561036/bf137340-8f85-4fab-9a0c-1ddd443ba4c7 as an svg-file. Try opening the file yourself and paste its code here.

NicklasVraa avatar Aug 16 '23 19:08 NicklasVraa

You can download it off this drive link (cleaner than pasting that much code for an SVG here)

VKohli17 avatar Aug 16 '23 22:08 VKohli17

@VKohli17 I really like this icon pack, what did you use?

proJM-Coding avatar Aug 17 '23 10:08 proJM-Coding

BeautyLine

VKohli17 avatar Aug 17 '23 11:08 VKohli17

Thank you

proJM-Coding avatar Aug 17 '23 22:08 proJM-Coding

Are they the only icons that remain unconverted or are there others offscreen? Also have you tried recolouring a different icon theme?

ItsTerm1n4l avatar Sep 13 '23 10:09 ItsTerm1n4l

Are they the only icons that remain unconverted or are there others offscreen? Also have you tried recolouring a different icon theme?

There are others offscreen. Have tried recoloring the "Candy Icons" theme too, same issue (even more unconverted icons for that one)

VKohli17 avatar Sep 13 '23 11:09 VKohli17

I have just looked at the latest version and the file permissions seem identical, the image sizes vary but there are no differences between the images that ware recoloured and those that weren't, have you tried again since with the latest version? Its very odd.

ItsTerm1n4l avatar Sep 13 '23 11:09 ItsTerm1n4l

I have just looked at the latest version and the file permissions seem identical, the image sizes vary but there are no differences between the images that ware recoloured and those that weren't, have you tried again since with the latest version? Its very odd.

Yep, retried with the latest version. Same issue.

VKohli17 avatar Oct 02 '23 17:10 VKohli17

I think i probably found the cause of this issue. If you get a icon theme like this one, you will see the following:

Here are the svgs before being recolored:

   .ColorScheme-Text { color:#dfdfdf; } .ColorScheme-Highlight { color:#4285f4; } .ColorScheme-NeutralText { color:#ff9800; } .ColorScheme-PositiveText { color:#4caf50; } .ColorScheme-NegativeText { color:#f44336; }
  <linearGradient id="_Linear1" x2="1" gradientTransform="matrix(2.54933e-15,-41.6338,41.6338,2.54933e-15,445.153,52.7218)" gradientUnits="userSpaceOnUse">
   <stop style="stop-color:rgb(16,117,246)" offset="0"/>
   <stop style="stop-color:rgb(18,197,255)" offset="1"/>
  </linearGradient>
  <linearGradient id="_Linear2" x2="1" gradientTransform="matrix(-.0561414 21.4963 -21.4963 -.0561414 -447.096 21.039)" gradientUnits="userSpaceOnUse">
   <stop style="stop-color:rgb(18,108,152)" offset="0"/>
   <stop style="stop-color:rgb(11,79,148)" offset="1"/>
  </linearGradient>

Here they are after being recolored:

<svg xmlns="http://www.w3.org/2000/svg" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2" width="100%" height="100%" viewBox="0 0 16 16" xml:space="preserve">
 <defs>
  <style id="current-color-scheme" type="text/css">
   .ColorScheme-Text { color:#bfb4b1; } .ColorScheme-Highlight { color:#60524e; } .ColorScheme-NeutralText { color:#88736e; } .ColorScheme-PositiveText { color:#776561; } .ColorScheme-NegativeText { color:#473c39; }
  </style>
 </defs>
 <path style="fill:currentColor;" class="ColorScheme-Text" d="M13.172,9.718l-2.828,2.828l0.707,0.708l1.621,-1.622l-0,4.086l1,0l-0,-4.086l1.621,1.622l0.707,-0.708l-2.828,-2.828Zm-8.781,-8.168c0.424,0 0.626,0.22 0.942,0.638c0.317,0.419 0.461,0.684 1.041,0.706l8.683,0c0.523,0 0.943,0.421 0.943,0.943l-0,5.595l-0.889,0l0,-5.077c0,-0.317 -0.255,-0.572 -0.572,-0.572l-8.425,0c-0.362,0 -1.003,-0.436 -1.232,-0.665c-0.229,-0.228 -0.416,-0.679 -1.01,-0.679l-2.411,-0c-0.317,-0 -0.572,0.255 -0.572,0.572l-0,9.978c-0,0.317 0.255,0.572 0.572,0.572l8.627,0l0,0.889l-9.145,-0c-0.523,-0 -0.943,-0.42 -0.943,-0.943l0,-11.014c0,-0.523 0.42,-0.943 0.943,-0.943l3.448,0Z"/>
</svg>

 <svg style="clip-rule:evenodd;fill-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg">
 <g transform="scale(.75)">
  <path d="m61.122 15.88c0-2.762-2.239-5-5-5h-48.244c-2.761 0-5 2.238-5 5v32.246c0 2.761 2.239 5 5 5h48.244c2.761 0 5-2.239 5-5v-32.246z" style="fill:rgb(0,131,213)"/>
 </g>
 <g transform="scale(.75)">
  <path d="m61.122 20.652c0-1.326-0.527-2.598-1.465-3.536-0.938-0.937-2.209-1.464-3.535-1.464h-25.58c-1.232 0-2.42-0.455-3.337-1.277-0.768-0.689-1.713-1.535-2.481-2.224-0.917-0.822-2.105-1.277-3.337-1.277h-13.509c-1.326 0-2.597 0.527-3.535 1.465-0.938 0.937-1.465 2.209-1.465 3.535v32.252c0 2.761 2.239 5 5 5h48.244c2.761 0 5-2.239 5-5v-27.474z" style="fill:url(#_Linear1)"/>
 </g>
 <g transform="scale(.75)">
  <path d="m27.82 22.29 7.166 11.943h9.554l-7.964-11.943h-8.756zm-1.669 1.432-6.691 12.899 4.54 7.166 6.209-12.899-4.058-7.166zm4.058 12.899-3.583 7.166h14.331l3.583-7.166h-14.331z" style="fill-rule:nonzero;fill:url(#_Linear2)"/>
 </g>
 <defs>
  <linearGradient id="_Linear1" x2="1" gradientTransform="matrix(2.54933e-15,-41.6338,41.6338,2.54933e-15,445.153,52.7218)" gradientUnits="userSpaceOnUse">
   <stop style="stop-color:rgb(6,117,146)" offset="0"/>
   <stop style="stop-color:rgb(18,197,2155)" offset="1"/>
  </linearGradient>
  <linearGradient id="_Linear2" x2="1" gradientTransform="matrix(-.0561414 21.4963 -21.4963 -.0561414 -447.096 21.039)" gradientUnits="userSpaceOnUse">
   <stop style="stop-color:rgb(18,108,152)" offset="0"/>
   <stop style="stop-color:rgb(11,79,148)" offset="1"/>
  </linearGradient>
 </defs>
</svg>

And, as you can see: the svg files that use rgb values are not properly recolored.

diegofariasm avatar Apr 03 '24 03:04 diegofariasm

So the issue is Icon packs with gradients then?

ItsTerm1n4l avatar May 13 '24 16:05 ItsTerm1n4l

So the issue is Icon packs with gradients then?

Not really. What i meant by my previous response is that using rgb values cause the icons to not get recolored.

So, if you for example use a rgb color like this on a svg

rgb(32, 32, 35)

That will make your icon not get recolored.

And so, the fix for that would be to just convert said color a hex value:

#202023

Which will now be recognized by the tool and recolorized on future invocations.

diegofariasm avatar May 14 '24 00:05 diegofariasm

Ok, gotcha.

ItsTerm1n4l avatar May 14 '24 06:05 ItsTerm1n4l