Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Multi-colored objects
- Pixar2000
- Scratcher
100+ posts
Multi-colored objects
One day I looked at the Unicorn sprite, and the mane and tail were multi-colored! And yes, the object was one shape. How was this done? Oh, and by the way, it was a three colored gradient.
Last edited by Pixar2000 (Oct. 21, 2018 23:18:30)
Para::greyThis signature is currently being protected by SiggyBot.
de::motion
x::variables
(: ::custom-arg) )::custom ringoooooo new forum server
- Pixar2000
- Scratcher
100+ posts
Multi-colored objects
It wasn't grouped either. There is a hidden function which is the group button.
You can select multiple objects in the vector editor by Shift-Clicking each one. Now a button appears to join them all together into one.
You can ungroup with the same button.
Para::greyThis signature is currently being protected by SiggyBot.
de::motion
x::variables
(: ::custom-arg) )::custom ringoooooo new forum server
- Pixar2000
- Scratcher
100+ posts
Multi-colored objects
Here is a project with the Unicorn sprite for reference: https://scratch.mit.edu/projects/168980938/ (Credit to yzyzyzlol for that project.)
Para::greyThis signature is currently being protected by SiggyBot.
de::motion
x::variables
(: ::custom-arg) )::custom ringoooooo new forum server
- imfh
- Scratcher
1000+ posts
Multi-colored objects
Vector graphics can have multiple color gradients in them, you just can't make them like that with the Scratch editor(I think). It means it was made with some other SVG editor.
Scratch to Pygame converter: https://scratch.mit.edu/discuss/topic/600562/
- Pixar2000
- Scratcher
100+ posts
Multi-colored objects
Yes, I know that, but every time I do that, the gradients don't look right. (Or maybe I'm misremembering and it actually worked, just that if it didn't work, it only worked in the past.) Vector graphics can have multiple color gradients in them, you just can't make them like that with the Scratch editor(I think). It means it was made with some other SVG editor.
Last edited by Pixar2000 (Oct. 23, 2018 21:59:06)
Para::greyThis signature is currently being protected by SiggyBot.
de::motion
x::variables
(: ::custom-arg) )::custom ringoooooo new forum server
- NickyNouse
- Scratcher
1000+ posts
Multi-colored objects
There's a bunch of specific stuff you have to do to SVGs to make them display right in Scratch. Here's some code that Scratch 3 uses to be consistent with Scratch 2's SVG quirks: https://github.com/LLK/scratch-svg-renderer/blob/develop/src/svg-renderer.js#L206 – it looks like this code recursively goes through every <linearGradient> element and sets the attribute x2=“0” so I would start by opening up your SVG in a text editor and doing the same thing (or removing the x2 values? I'm confusing myself)Yes, I know that, but every time I do that, the gradients don't look right. (Or maybe I'm misremembering and it actually worked, just that if it didn't work, it only worked in the past.) Vector graphics can have multiple color gradients in them, you just can't make them like that with the Scratch editor(I think). It means it was made with some other SVG editor.
Last edited by NickyNouse (Oct. 25, 2018 06:01:13)
- Discussion Forums
- » Advanced Topics
- » Multi-colored objects