Jump to content
GreenSock

edquijano

Trying DrawSVGPlugin but not color

Recommended Posts

I'm trying to use DrawSVGPluging but as a beginner user, I'm doing something wrong but I don't know what is wrong. I want that the "Q" appear in color green, so far only the grey appear in the animation. The gray is the base and the animated draw should be green, as in the example given by the GSAP video tutorial. 

 

Does anybody could take a look at my code in codepen and tell me what's wrong?

 

Thanks

See the Pen OyeQeK by edquijano (@edquijano) on CodePen

Link to comment
Share on other sites

Hi edquijano :)

 

That's just coming from your CSS with the stroke set to hex value of #444.

 

Set that to the green that you want and you'll be all set.

 

You also have two identical paths so in my fork of your pen, I animated both with a different color and stroke width.

 

See the Pen KdjoaW by PointC (@PointC) on CodePen

 

 

PS - anyone reading this - there is a typo in the codepen link from the OP  - it should be: 

See the Pen OyeQeK by edquijano (@edquijano) on CodePen

  • Like 2
Link to comment
Share on other sites

Thanks Diaco and PointC. With the both answer replies, I can see where is my error. I can learn from there.

 

Thanks again.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×