/r/svg

Photograph via snooOG

/r/svg

3,322 Subscribers

1

SVG Size Help

I work on a software design team that is refreshing their library of illustrations (all SVG). Currently the style is very flat shapes and the new style is chock full of gradients and blurs, increasing the file size dramatically. I'm wondering if anyone has strategies for using a range of rich, gradient driven illustration in product design while also keeping file size down and usable across all platforms (web, native mobile, etc)?

I'd like maintain our use of vector graphics, but maybe software teams are using bitmap PNGs in this scenario? I dunno but it feels like a step backwards for me. Any advice or experiences greatly appreciated. Cheers.

5 Comments
2024/11/06
18:34 UTC

6

Looking for an SVG code editor

I'm looking for suggestions for a code editor. I would like to enter SVG code, and be able to see it right away in an adjacent preview window.

  • I can also edit the image in the preview window
  • Preferably a windows download. Otherwise maybe online.
  • Preferably free
12 Comments
2024/10/31
03:33 UTC

4

creating a "spark" animation along a path

I have a pretty basic animation that I'm trying to improve https://precept.sh/images/animated.svg

Right now each animated "spark" starts off in the color that it ends with. What I'm really hoping to do is have them all start as white until the enter the "precept" box, do the transition from white to their respective colors within the box, and finish their journey completely in their final color. However if I transform the colors in transit then the tail also transforms and the effect is lost.

One thing I was thinking was to make the path static with the gradient in place but with an opacity of 0 for its entirety, then have a box with a rgba(0,0,0,0);rgba(0,0,0,0.8);rgba(0,0,0,0) gradient follow it, applying a feCompose:lighter filter so that the alpha channel of the box merges with the invisible path underneath as it moves, and the resulting color will be what I'm looking for. But I can't seem to make it work. I'm not even sure it can work - and if so why not?

Codepen of my idea - The codepen has two copies of what I'm trying to do - one as a reference with full color, and one with ever so slight colors just so we know they're actually there

0 Comments
2024/10/29
17:04 UTC

1

Do i need to use svg to achieve this form of button on a website?

i want to make a button on the top of a website with the following form:
https://yqnn.github.io/svg-path-editor/#P=M_0_0_C_10_0_27_0_50_30_C_50_30_70_60_100_60_H_300_C_307_60_328_61_350_30_C_350_30_373_0_400_0

do i need svg to achieve this?

thanks in advance.

6 Comments
2024/10/28
14:15 UTC

2

Free SVG Animation Color Tool

Hey guys, my name is Juan and I just released a very simple online tool that lets you change the colors of your SVG animation quick and easy. I needed this tool for my work, but I think more people will enjoy it.

I just spent a couple of hours on it today and I'm thinking about adding batch processing and other features.

Anyways here it is https://www.temperamento.net/color-me-bad/

1 Comment
2024/10/24
18:52 UTC

1

How make an SVG object scale relative to an outer object regardless?

I have a simple rectangle, see code below.

Within it, I would like to dedicate a rectangular area of a fixed size (slightly smaller than the rectangle). In this area, I want to be able to put any SVG object and make it scale with the "outer" rectangle.

I have tried making a <g> tag, <svg> within the outer <svg> etc, but since the images almost always contain fixed x-y values and whatnot, it always ends up outside of my viewBox. I want to draw the image inside relative to the outer rectangle if that makes sense. I have googled around a bit but haven't found anything useful.

The reason is I have a Power BI that should dynamically change the "inner" SVG object based on certain criteria, and I don't want to custom make every inner object relative to the outer object as I have dozens of objects.

TLDR: How can I designate an area within my rectangle (or within my <svg> in general) that will scale any SVG put inside of it regardless of dimensions etc of this object?

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500">
    <rect x="10" y="10" width="480" height="480" style="fill: rgb(216, 216, 216); stroke: rgb(0, 0, 0);"/>
  
</svg>
3 Comments
2024/10/23
09:45 UTC

5

generate animated pseudo random glitch SVG from ASCII characters

1 Comment
2024/10/21
05:59 UTC

2

Resize and center svg and convert to transparent png/img

I have svg file and I have to convert it to square size (without reshaping) and center within this square area and convert to transparent file (for google search). Now its 85x65 px and I want to make it for exmaple 85x85 px and center it vertically since the height is smaller than width. Is there any online tool to do it?

3 Comments
2024/10/20
22:30 UTC

5

How to significantly decrease SVG file size

I have a 137MB SVG that I would like to significantly decrease the size of, every time I open it on Inkscape it struggles and using the "simplify" tool makes it have the wrong shapes, is there a way to compress this file while still keeping the shapes?

5 Comments
2024/10/20
15:53 UTC

5

Search Engine of 200k+ Open Source Free SVG Icons

What you get:

-> Unlimited searches & downloads
-> No licensing fees - 100% FREE
-> Copy & paste ready-to-use icons
-> Organized icons collections

Perfect for: developers, designers & creators

Check This Out --> Free SVG Icons
#freesvgicon #svg

3 Comments
2024/10/19
08:15 UTC

2

Improve Tiny SVG Analog Clock

Hi guys! I’ve implemented the smallest SVG analog clock I could make. Is there a way to make it even smaller or simpler? Alternatively, without adding too much complexity, how can I make it look more appealing? Do you have any suggestions for improvement?

Here’s the CodeSandbox.

Edit: Improved code after suggestions:

const AnalogClock = ({ date = new Date() }) => (
  <div
    mount={(self) => {
      const timerId = setInterval(() => {
        date = new Date();
        update(self);
      }, 1000);

      return () => clearInterval(timerId);
    }}
  >
    <svg viewBox="-50 -50 100 100">
      <circle class="face" r="48" />
      <line
        class="hour"
        transform={() =>
          `rotate(${30 * (date.getHours() % 12) + date.getMinutes() / 2})`
        }
        y2="-25"
      />
      <line
        class="minute"
        transform={() => `rotate(${6 * date.getMinutes()})`}
        y2="-35"
      />
      <line
        class="second"
        transform={() => `rotate(${6 * date.getSeconds()})`}
        y2="-35"
      />
    </svg>
  </div>
);

Made with Fusor library

13 Comments
2024/10/12
08:55 UTC

2

Find Christmas SVG

I found some Christmas svg from here. but I need more can anyone suggest place to find them.

5 Comments
2024/10/08
11:19 UTC

1

I'm trying to display a svg in a tv browser...facing scaling issues

There is a benchmark rectangle in tbe svg of size 5in x 4n. When I load it in the browser and measure the value it is coming as 14.7in something in width and similarly some higher value in heigh. How to render a svg 1:1 in TV browsers?

0 Comments
2024/10/01
06:13 UTC

1

Looking for a hand maid svg

I would prefer if the handmaid had her hands in the air as if she was holding a sign for protest. I am willing to pay for the SVG file if someone is able to make this.

1 Comment
2024/09/29
23:34 UTC

3

Question: Can you modulate stroke width on a path?

I'm not sure if it's impossible or if I'm just not googling the right quesiton. Essentially My goal is to do a path with multiple cubic curves between points but I want the stroke with to taper up/down or sometimes to be wider in the center. If it's impossible I'll probably have to instead drawn the outline of the outline and then do a fill.

3 Comments
2024/09/16
02:37 UTC

6

SVG to DXF

Does anybody know how to convert an SVG to DXF in an automatic way? Programatically or via a command line? I don't care if it's a paid service, or open source.

I've tried a number of online APIs and so far nothing works that retains the layer names to the DXF except manually doing it through Adobe Illustrator. But I need a way to do it in an automated fashion.

6 Comments
2024/09/06
17:47 UTC

1

Is it possible to place (0, 0) in the center of an SVG file?

I was trying to do this in Inkscape but nobody could help. It seems that it might be a problem with the SVG specification. I can't seem to manually code an SVG file that does not force the (0, 0) coordinates to the corner of the page. is there a way to make this happen, or do I have to just go with the flow? Drawing a symmetrical, mostly, bolt circle, and this should be simple, and yeah I COULD use all positive values but I know this will come up again and again. Graphing functions is another area where one must often draw with negative value coordinates.

2 Comments
2024/09/04
17:26 UTC

1

Is an SVG Converted from JPEG Scalable?

Or does an SVG have to start life as an SVG to be scalable?

4 Comments
2024/08/31
18:55 UTC

4

Edit SVG Files

HI! I have absolutely no idea how to really use svg files and need some help editing a playing card box template. I have purchased a custom deck of poker sized playing cards as a gift for my husband. I didn't like the box options they came with so I figured I could just make my own tuck box. This is proving much more difficult than I thought. I have downloaded a temple but the deck is about twice as thick as a normal deck. I don't know how to adjust the measurements on the template to match what I need. I would really appreciate any help!

4 Comments
2024/08/29
01:28 UTC

1

Seeking SVG Dataset for Image Retrieval

I'm working on a project involving Content-Based Image Retrieval (CBIR) and I'm specifically looking for datasets in SVG format. Most datasets I’ve found are in raster formats (like JPG or PNG), but I need scalable vector graphics for my experiments. Has anyone come across an SVG dataset suitable for CBIR? Any suggestions or research papers on SVG-based image retrieval would be greatly appreciated!

0 Comments
2024/08/27
01:35 UTC

5

SVG renders differently on different browsers

Just wondering what other SVG fans have found.

I have been working on a visualization of Saturn's rings from Voyager data. Everything that isn't text in this SVG file is just a distorted circle. Sounds simple and unambiguous, right. Compare these results.

Chrome is best. Everything you see pretty much matches my intentions.

https://preview.redd.it/557rbtp8uikd1.png?width=1920&format=png&auto=webp&s=feefe82345cd0c63a47a2d77b0ab2ddb4a81013a

Safari next best. Note the "seam" on the equator of Saturn and the moire effect on the horizontal axis of the rings. Also the blur on the shadow on the rings is excessive (but I think I like it better that way).

https://preview.redd.it/9ma55sp8uikd1.png?width=1920&format=png&auto=webp&s=c5ddc64e1dcd5bcc39bc5b2616d484c2446450db

Firefox doesn't understand masking. Where's Saturn? Lack of detail in the rings. Color blending issues as well.

https://preview.redd.it/xo2knsp8uikd1.png?width=1920&format=png&auto=webp&s=ac096ef697f208a22d2a09b365ab9740a4553204

On the other side of Saturn, Chrome wins again. Details nicely rendered.

https://preview.redd.it/ne3gxdy5wikd1.png?width=1920&format=png&auto=webp&s=b504831ea7e9f74c64e8d71748abacc1d54d0aa3

Safari adds a moire-like stain to the horizontal axis of the rings.

https://preview.redd.it/1ezq4ey5wikd1.png?width=1920&format=png&auto=webp&s=a966613d69867c6ececdb3cd8ef2a59cf52da326

Firefox does not mask correctly. Ring details are lost. Opacity on the D ring (the one closest to Saturn) is completely ignored. Text is out of alignment.

https://preview.redd.it/f96rrey5wikd1.png?width=1920&format=png&auto=webp&s=c6795b5e536279845fb4f0089582acc7dbe03334

0 Comments
2024/08/24
02:35 UTC

1

First 3d model on svg (simplified version of app demo)

result

0 Comments
2024/08/17
22:35 UTC

2

SVG Clip Path rounded corners question

Hi, 

I'm new to CSS and am building out my graphic design website on Cargo. I wanted a menu shape different from their square or pill box options, and made a bevel shape by using clip-path. I'd like to round the edges of my bevel and saw that i could use an svg to round them.

I tried to use https://yqnn.github.io/svg-path-editor/ (dragged in shape screen shot and tried to trace it like i would in illustrator) for it to spit out the code. There's no pen tool though like illustrator has so it feels impossible to trace the shape (but maybe i'm missing something?). 

i don't think i can do it on Figma and get it that way either because I think that just spits out the code for a shape.  

I understood how to make the shape with clip path because it's just coordinates, but all the math involved with creating bezier curves feels impossible to figure out. 

Does anyone know how to do this?

Pictured is my clip path menu (no items on it yet) and here is my code from cargo.

[id="S2811747776"].page {

background-color: rgba(132, 82, 82, 0.44);

}

[id="S2811747776"] .page-content {

border-width: 0.0rem;

border-color: rgba(0,0,0,0);

border-style: none;

}

[id="S2811747776"] .page-layout {

padding-bottom: 40.9rem;

padding-right: 0.0rem;

padding-top: 24.1rem;

align-items: flex-end;

}

[id="S2811747776"]

{

   clip-path: polygon(

53.4% 18.8%, 

59% 18.8%, 

62.4% 25%, 

62.4% 63%, 

59.2% 69%, 

53% 69%, 

50% 63%, 

50% 25%);

}

https://preview.redd.it/9ktrio0fooid1.png?width=928&format=png&auto=webp&s=070e207b7ac076c771d3e55cd5f3c1ec1db942ec

1 Comment
2024/08/14
19:47 UTC

2

Can SVG animation implement following function without using javascript?

I want to have a vertical bar(use line to do the job), so:

Time=0s: |

Time=1s:    |

Time=2s:    |

Time=3s:     |

Time=4s:      |

Time=5s:          |

Time=6s:         |

Time=7s:    |

Time=8s:    |

Time=9s: bar disappear. I understand I can set x to negative value to do the job

 

Then after 5s, repeat above process

 

Thanks

2 Comments
2024/08/10
18:53 UTC

3

Replace white with transparent?

I have an SVG of a Spotify code but I want to replace the white with transparent.

https://preview.redd.it/ypi5ijec0ghd1.jpg?width=640&format=pjpg&auto=webp&s=4af3ad2d1ea9971103b7a0cf13ad248459700668

What is the best way to do this? I have tried changing the colour of the white objects to transparent in various online tools however it just makes the white objects disappear instead of making them transparent.

5 Comments
2024/08/08
13:35 UTC

3

How do I properly apply a border radius to svg paths?

This path:

<path d="M0 0, 0 15 A5 5 1 0 0 5 20, L100 20"/>

will create a line that looks like the thin green line here:

https://preview.redd.it/2joctrnuo4fd1.png?width=651&format=png&auto=webp&s=c336364bd3f7131148f55709b42677dbf853a214

I don't understand why the curved part is thicker than the rest of the line. The only way I've found to fix it is applying a border-radius to its SVG parent, but this limits some features I will need.

Here are styles applied to this line:

  stroke-width: 2px;
  stroke: rgb(40, 220, 34);
  fill: transparent;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  stroke-linejoin: round;
  animation: dash 5s linear forwards;
6 Comments
2024/07/27
21:25 UTC

1

Center Logo in Box

Hey guys.

I'm trying to center the word/design "ARCADE" in a transparent dark gray box.
I'm having a heck of a time trying to understand how this works with the viewport and rectangle elements.

Is this possible?

Here's what I've come up with (viewport numbers are just random from me testing).
For now, I've made the box white just to make testing easier.

And if some way I could round the corners, even better!

Thanks for any help!


<?xml version="1.0" encoding="utf-8"?> <svg version="1.1" viewBox="-1000 -1000 6000 2000" xmlns="http://www.w3.org/2000/svg"> <rect x="0" y="0" width="6000" height="3000" fill="#ffffff" fill-opacity="0.3" /> <path class="st3" d="M 3840 236.8 L 3840 0 L 3276.1 0 L 3276.1 584.4 L 3840 584.4 L 3840 520 L 3491.1 520 L 3491.1 388.9 L 3613.6 388.9 L 3613.6 368 L 3491.1 368 L 3491.1 236.8 L 3840 236.8 Z M 3331.1 55.1 L 3331.1 245.4 C 3331.1 251.1 3326.5 255.8 3320.7 255.8 C 3314.9 255.8 3310.3 251.2 3310.3 245.4 L 3310.3 44.7 C 3310.3 39 3314.9 34.3 3320.7 34.3 L 3585.1 34.3 C 3590.8 34.3 3595.5 38.9 3595.5 44.7 C 3595.5 50.4 3590.9 55.1 3585.1 55.1 L 3331.1 55.1 Z" style="fill: rgb(255, 255, 255);"/> <path class="st3" d="M 1843.4 140.7 C 1820.4 102.9 1789.1 70.6 1751.6 46.5 C 1704.6 16.1 1649.9 0 1593.5 0 C 1432.4 0 1301.3 131.1 1301.3 292.2 C 1301.3 453.3 1432.4 584.4 1593.5 584.4 C 1649.8 584.4 1704.5 568.3 1751.6 538 C 1789.1 513.8 1820.4 481.6 1843.4 443.8 L 1523.9 292.3 L 1843.4 140.7 Z M 1573.4 365.1 C 1575.8 359.9 1582 357.7 1587.2 360.2 L 1779.2 451.3 C 1782.2 452.7 1784.3 455.5 1784.9 458.7 C 1785.5 461.9 1784.6 465.3 1782.3 467.7 C 1767.6 483.5 1751 497.4 1733 509.1 C 1731.3 510.2 1729.3 510.8 1727.4 510.8 C 1724 510.8 1720.7 509.1 1718.7 506.1 C 1715.6 501.3 1717 494.9 1721.8 491.8 C 1734.4 483.7 1746.3 474.3 1757.2 463.9 L 1578.3 379.1 C 1573.1 376.5 1570.9 370.3 1573.4 365.1 Z" style="fill: rgb(255, 255, 255);"/> <path class="st3" d="M 300.3 32.6 L 0 584.4 L 600.6 584.4 L 300.3 32.6 Z M 300.3 409.1 C 283 409.1 269 395.1 269 377.8 C 269 360.5 283 346.5 300.3 346.5 C 317.6 346.5 331.6 360.5 331.6 377.8 C 331.6 395.1 317.6 409.1 300.3 409.1 Z M 525.4 550 L 393.2 550 C 387.5 550 382.8 545.4 382.8 539.6 C 382.8 533.9 387.4 529.2 393.2 529.2 L 508 529.2 L 446.3 416 C 443.6 411 445.4 404.7 450.4 402 C 455.4 399.3 461.7 401.1 464.4 406.1 L 534.4 534.7 C 536.1 537.9 536.1 541.8 534.2 544.9 C 532.4 548.1 529 550 525.4 550 Z" style="fill: rgb(255, 255, 255);"/> <path class="st3" d="M 2165.7 32.6 L 1865.4 584.4 L 2466 584.4 L 2165.7 32.6 Z M 2165.7 409.1 C 2148.4 409.1 2134.4 395.1 2134.4 377.8 C 2134.4 360.5 2148.4 346.5 2165.7 346.5 C 2183 346.5 2197 360.5 2197 377.8 C 2197 395.1 2183 409.1 2165.7 409.1 Z M 2390.7 550 L 2258.5 550 C 2252.8 550 2248.1 545.4 2248.1 539.6 C 2248.1 533.9 2252.7 529.2 2258.5 529.2 L 2373.3 529.2 L 2311.7 416 C 2309 411 2310.8 404.7 2315.8 402 C 2320.8 399.3 2327.1 401.1 2329.8 406.1 L 2399.8 534.7 C 2401.5 537.9 2401.5 541.8 2399.6 544.9 C 2397.8 548.1 2394.4 550 2390.7 550 Z" style="fill: rgb(255, 255, 255);"/> <path class="st3" d="M 2892.2 0 L 2561.8 0 L 2561.8 584.4 L 2892.2 584.4 C 3053.3 584.4 3184.4 453.3 3184.4 292.2 C 3184.4 131.1 3053.3 0 2892.2 0 Z M 2889.5 405.9 C 2872.2 405.9 2858.2 391.9 2858.2 374.6 C 2858.2 357.3 2872.2 343.3 2889.5 343.3 C 2906.8 343.3 2920.8 357.3 2920.8 374.6 C 2920.8 391.9 2906.8 405.9 2889.5 405.9 Z M 3078.8 469.9 C 3035.3 515.6 2976.9 543.7 2914.4 549.1 C 2914.1 549.1 2913.8 549.1 2913.5 549.1 C 2908.2 549.1 2903.7 545 2903.2 539.6 C 2902.7 533.9 2906.9 528.9 2912.6 528.4 C 3032 518.2 3125.1 420.1 3129.1 300.3 C 3129.3 294.6 3134 290.1 3139.8 290.3 C 3145.5 290.5 3150 295.3 3149.8 301 C 3147.7 364.1 3122.5 424.1 3078.8 469.9 Z" style="fill: rgb(255, 255, 255);"/> <path class="st3" d="M 1022.7 367.6 C 1027.5 356.8 1038.2 349.9 1050 349.9 L 1057.7 349.9 C 1154.2 349.9 1232.6 271.4 1232.6 175 C 1232.6 78.5 1154.1 0.1 1057.7 0.1 L 696.4 0.1 L 696.4 584.5 L 1195.2 584.5 L 1027.9 399.8 C 1020 391 1017.9 378.4 1022.7 367.6 Z M 1057.7 294.8 C 1117.1 294.8 1168.2 250.5 1176.4 191.7 C 1177.2 186 1182.4 182.1 1188.1 182.9 C 1193.8 183.7 1197.7 188.9 1196.9 194.6 C 1192.2 227.8 1175.7 258.4 1150.3 280.7 C 1124.7 303.2 1091.8 315.6 1057.7 315.6 C 1052 315.6 1047.3 311 1047.3 305.2 C 1047.3 299.4 1052 294.8 1057.7 294.8 Z M 976.3 147 C 993.6 147 1007.6 161 1007.6 178.3 C 1007.6 195.6 993.6 209.6 976.3 209.6 C 959 209.6 945 195.6 945 178.3 C 945 161 959 147 976.3 147 Z M 1103.8 543.9 C 1102.1 547.6 1098.4 550.1 1094.3 550.1 L 962.3 550.1 C 956.6 550.1 951.9 545.5 951.9 539.7 C 951.9 534 956.5 529.3 962.3 529.3 L 1071 529.3 L 987.1 436.7 C 981.3 430.4 976.6 423.2 973 415.4 C 970.6 410.2 972.9 404.1 978 401.7 C 983.2 399.3 989.3 401.6 991.7 406.7 C 994.4 412.6 998 418 1002.4 422.8 L 1102 532.7 C 1104.7 535.7 1105.4 540.1 1103.8 543.9 Z" style="fill: rgb(255, 255, 255);"/> </svg>
0 Comments
2024/07/26
04:31 UTC

3

Why are linearGradient links so inconsistent

6 Comments
2024/07/23
16:02 UTC

Back To Top