如何delete svg入面多餘的color?

本帖最後由 3ldk 於 2017-7-27 02:21 編輯

我有一張咁既svg, 一開始define左有四隻色

然後下面有一個path, 用左Sj5ks6kmdcz4依隻色
但其餘三隻就全張svg都無用過, 如果用inkscape(或其他軟件), 點可以清走無用過的顏色?
  1. <svg
  2.         xmlns="http://www.w3.org/2000/svg"
  3.         xmlns:xlink="http://www.w3.org/1999/xlink" id="workspace" style="text-rendering: geometricPrecision; cursor: auto;">
  4.         <defs>
  5.                 <linearGradient x1="0" y1="0.5" x2="1" y2="0.5" id="Sj5ks6kmdcz4">
  6.                         <stop offset="0%" stop-color="#4676fa"/>
  7.                         <stop offset="100%" stop-color="#4676fa"/>
  8.                 </linearGradient>
  9.                 <linearGradient x1="0" y1="0.5" x2="1" y2="0.5" id="Sj5ks6kmdcz7">
  10.                         <stop offset="0%" stop-color="#4676fa"/>
  11.                         <stop offset="100%" stop-color="#4676fa"/>
  12.                 </linearGradient>
  13.                 <linearGradient x1="0" y1="0.5" x2="1" y2="0.5" id="Sj5ks6kmdcza">
  14.                         <stop offset="0%" stop-color="#4676fa"/>
  15.                         <stop offset="100%" stop-color="#4676fa"/>
  16.                 </linearGradient>
  17.                 <linearGradient x1="0" y1="0.5" x2="1" y2="0.5" id="Sj5ks6kmdczd">
  18.                         <stop offset="0%" stop-color="#4676fa"/>
  19.                         <stop offset="100%" stop-color="#4676fa"/>
  20.                 </linearGradient>
  21.         </defs>
  22.         <g transform="matrix(2.7273,0,0,2.7273,719.7273,452.3637)" style="cursor: move; opacity: 1;" class="svg-clip svg-visible">
  23.                 <rect x="0" y="0" width="42" height="32" fill="none" class="svg-hitbox"/>
  24.                 <svg width="42.622719807146154" height="32.990130874550054" viewBox="12.031399006224156,53.168,42.622719807146154,32.990130874550054">
  25.                         <defs/>
  26.                         <g>
  27.                                 <path fill="url('#Sj5ks6kmdcz4')" d="M37.858,78.168c-1.678,0.063-3.411-0.145-5.102-0.574c-1.696-0.434-3.341-1.088-4.841-1.91   c-1.495-0.822-2.836-1.812-3.935-2.911c-1.087-1.094-1.929-2.288-2.438-3.539c-0.5-1.237-0.629-2.405-0.436-3.456   c0.192-1.041,0.696-1.968,1.461-2.736c0.758-0.76,1.769-1.366,2.992-1.78c1.206-0.407,2.622-0.629,4.203-0.621   c1.567,0.011,3.161,0.243,4.698,0.659c1.536,0.412,3.025,1.007,4.393,1.74c1.37,0.737,2.626,1.615,3.688,2.597   c1.066,0.988,1.941,2.084,2.54,3.247c0.605,1.18,0.873,2.32,0.839,3.378c-0.035,1.07-0.384,2.056-1.015,2.902   c-0.639,0.859-1.566,1.574-2.743,2.094C40.97,77.782,39.522,78.104,37.858,78.168 M28.622,58.169c-0.014,0-0.032,0-0.047-0.001   c-0.016,0.001-0.034,0-0.049,0.001c-0.016,0-0.032-0.001-0.048-0.001c-0.016,0-0.032,0-0.047,0.001   c-0.3-0.001-0.591,0.005-0.88,0.015c-0.289,0.012-0.573,0.029-0.852,0.054c-0.278,0.022-0.557,0.053-0.827,0.086   c-0.27,0.039-0.536,0.078-0.797,0.126c-1.509,0.272-2.851,0.736-3.982,1.358c-1.146,0.635-2.08,1.433-2.764,2.366   c-0.691,0.945-1.125,2.03-1.257,3.221c-0.13,1.204,0.049,2.516,0.583,3.895c0.644,1.656,1.736,3.247,3.166,4.7   c1.442,1.468,3.217,2.784,5.204,3.881c1.99,1.097,4.18,1.969,6.437,2.537c2.248,0.566,4.546,0.83,6.768,0.729   c2.038-0.092,3.822-0.482,5.31-1.106c1.471-0.62,2.65-1.465,3.505-2.479c0.839-0.998,1.364-2.156,1.542-3.42   c0.174-1.243,0.012-2.59-0.513-3.988c-0.041-0.107-0.084-0.217-0.128-0.324c-0.046-0.108-0.092-0.219-0.143-0.326   c-0.047-0.11-0.1-0.221-0.155-0.33c-0.053-0.109-0.109-0.22-0.167-0.329c-0.058-0.108-0.118-0.219-0.182-0.327   c-0.06-0.109-0.122-0.216-0.188-0.325c-0.065-0.105-0.132-0.213-0.201-0.319c-0.067-0.105-0.138-0.211-0.21-0.315   c-0.336-0.493-0.71-0.974-1.116-1.438c-0.405-0.465-0.839-0.914-1.305-1.347c-0.463-0.435-0.957-0.851-1.474-1.249   c-0.515-0.399-1.056-0.783-1.615-1.146c-0.254-0.166-0.513-0.327-0.776-0.481c-0.263-0.156-0.529-0.308-0.798-0.459   c-0.271-0.147-0.545-0.291-0.822-0.43c-0.276-0.142-0.557-0.275-0.841-0.407c-0.798-0.368-1.624-0.703-2.464-0.993   c-0.843-0.293-1.701-0.544-2.568-0.752c-0.871-0.21-1.751-0.371-2.636-0.487C30.399,58.245,29.509,58.181,28.622,58.169"/>
  28.                         </g>
  29.                 </svg>
  30.         </g>
  31. </svg>
複製代碼