get start/end value #20

Open
opened 2022-05-27 05:15:08 +00:00 by fukemy · 0 comments
fukemy commented 2022-05-27 05:15:08 +00:00 (Migrated from github.com)

Hi, first i want to say I LOVE U, this lib is really useful to me
I can get colors and locations, now i want to get start/end value. Can u help?
Sample:

linear-gradient(180deg, rgba(112, 201, 47, 1) 25%, rgba(248, 202, 0, 1) 50%, rgba(189, 21, 80, 1) 75%)
const colors = gradient[0].colorStops.map((c) => {
 const t = c.value
                return `rgba(${t[0]}, ${t[1]}, ${t[2]}, ${[3]})`
            })
           
 const locations = gradient[0].colorStops.map((c) => {
                const l = c.length.value
                return l/100
            })

            
Hi, first i want to say ***I LOVE U***, this lib is really useful to me I can get colors and locations, now i want to get start/end value. Can u help? Sample: ``` linear-gradient(180deg, rgba(112, 201, 47, 1) 25%, rgba(248, 202, 0, 1) 50%, rgba(189, 21, 80, 1) 75%) const colors = gradient[0].colorStops.map((c) => { const t = c.value return `rgba(${t[0]}, ${t[1]}, ${t[2]}, ${[3]})` }) const locations = gradient[0].colorStops.map((c) => { const l = c.length.value return l/100 }) ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: rafaelcaricio/gradient-parser#20
No description provided.