Inkscape.org
Beyond the Basics Make a gradient from 2 swatchs
  1. #1
    jovial jovial @jovial

    I draw 2 rectangles filled with 2 swatchs: color1, color2,.
    And I draw a circle with a gradiant: grad1
    Is it possible to definite the gradiant from color1 & colors2  in order when I modify one swatch, it modifies the stop of my gradient ?
    My svg to do it:
     

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <!-- Created with Inkscape (http://www.inkscape.org/) -->
    
    <svg
       width="210mm"
       height="140mm"
       viewBox="0 0 210 140"
       version="1.1"
       id="svg24396"
       xmlns:xlink="http://www.w3.org/1999/xlink"
       xmlns="http://www.w3.org/2000/svg"
       xmlns:svg="http://www.w3.org/2000/svg">
      <defs
         id="defs24393">
        <linearGradient
           id="color2">
          <stop
             style="stop-color:#9acd32;stop-opacity:1;"
             offset="0"
             id="stop36285" />
        </linearGradient>
        <linearGradient
           id="color1">
          <stop
             style="stop-color:#ff1493;stop-opacity:1;"
             offset="0"
             id="stop36279" />
        </linearGradient>
        <linearGradient
           id="grad1">
          <stop
             style="stop-color:#ff1493;stop-opacity:1"
             offset="0"
             id="stop36064" />
          <stop
             style="stop-color:#9acd32;stop-opacity:1"
             offset="1"
             id="stop36066" />
        </linearGradient>
        <linearGradient
           xlink:href="#grad1"
           id="linearGradient36070"
           x1="87.36869"
           y1="70"
           x2="122.36869"
           y2="70"
           gradientUnits="userSpaceOnUse" />
        <linearGradient
           xlink:href="#color1"
           id="linearGradient36283"
           x1="37.342564"
           y1="70"
           x2="72.342213"
           y2="70"
           gradientUnits="userSpaceOnUse" />
        <linearGradient
           xlink:href="#color2"
           id="linearGradient36289"
           x1="137.65779"
           y1="70"
           x2="172.65744"
           y2="70"
           gradientUnits="userSpaceOnUse" />
      </defs>
      <rect
         style="fill:url(#linearGradient36283);fill-opacity:1;stroke-width:1.05833;stroke-linecap:round;stroke-linejoin:round;-inkscape-stroke:none;paint-order:fill markers stroke;stop-color:#000000"
         id="rect35882"
         width="34.999649"
         height="20"
         x="37.342564"
         y="60" />
      <rect
         style="fill:url(#linearGradient36289);fill-opacity:1;stroke-width:1.05833;stroke-linecap:round;stroke-linejoin:round;-inkscape-stroke:none;paint-order:fill markers stroke;stop-color:#000000"
         id="rect35936"
         width="34.999649"
         height="20"
         x="137.65779"
         y="60" />
      <circle
         style="fill:url(#linearGradient36070);fill-opacity:1;stroke-width:1.05833;stroke-linecap:round;stroke-linejoin:round;-inkscape-stroke:none;paint-order:fill markers stroke;stop-color:#000000"
         id="path35990"
         cx="104.86869"
         cy="70"
         r="17.5" />
    </svg>

     

Inkscape Inkscape.org Inkscape Forum Beyond the Basics Make a gradient from 2 swatchs