LarsFlieger Posted July 21, 2019 Share Posted July 21, 2019 Hello guys, I'm trying to do that for a while but nobody is able to help me. ;)How can I achieve to create images with PHP that look like these Multi Color Gradients? The patterns should defined by positions in the field. It's important that they aren't linear or circled. It needs to be a complex pattern. Any help would be amazing! Thank you :) Quote Link to comment https://forums.phpfreaks.com/topic/308996-how-to-generate-complex-multi-color-gradients-with-php/ Share on other sites More sharing options...
chhorn Posted July 22, 2019 Share Posted July 22, 2019 8 hours ago, LarsFlieger said: It needs to be a complex pattern what's the formular for your pattern? Quote Link to comment https://forums.phpfreaks.com/topic/308996-how-to-generate-complex-multi-color-gradients-with-php/#findComment-1568565 Share on other sites More sharing options...
LarsFlieger Posted July 22, 2019 Author Share Posted July 22, 2019 2 hours ago, chhorn said: what's the formular for your pattern? The pattern is created with Adobe Illustrator with their new gradient point tool (free gradients) Quote Link to comment https://forums.phpfreaks.com/topic/308996-how-to-generate-complex-multi-color-gradients-with-php/#findComment-1568568 Share on other sites More sharing options...
Barand Posted July 22, 2019 Share Posted July 22, 2019 13 hours ago, LarsFlieger said: It's important that they aren't linear or circled. As gradients come in two flavours - linear and radial, then good luck with that. 1 Quote Link to comment https://forums.phpfreaks.com/topic/308996-how-to-generate-complex-multi-color-gradients-with-php/#findComment-1568574 Share on other sites More sharing options...
requinix Posted July 22, 2019 Share Posted July 22, 2019 Looks like multiple linear and/or radial gradients. How are you at math? You'll need some. More than some. 1 Quote Link to comment https://forums.phpfreaks.com/topic/308996-how-to-generate-complex-multi-color-gradients-with-php/#findComment-1568578 Share on other sites More sharing options...
LarsFlieger Posted July 22, 2019 Author Share Posted July 22, 2019 1 hour ago, requinix said: Looks like multiple linear and/or radial gradients. How are you at math? You'll need some. More than some. 3 hours ago, Barand said: As gradients come in two flavours - linear and radial, then good luck with that. Thanks for your advices. Sounds like it will get difficult... The plan is to create a grid. Let's say 200x200 px. Now you can set points there. For example (50/100) (150/100). These points can get a hex code and with them the gradient will get created. (Like the current Illustrator version is doing it.) The UI can include the feature to movr the points with the mouse on the gird and to create new points. Quote Link to comment https://forums.phpfreaks.com/topic/308996-how-to-generate-complex-multi-color-gradients-with-php/#findComment-1568582 Share on other sites More sharing options...
requinix Posted July 22, 2019 Share Posted July 22, 2019 You should do this with Javascript and canvas, not PHP. But you'll still have to come up with the math to do what you want. I'm thinking parametric equations. Fun stuff. 1 Quote Link to comment https://forums.phpfreaks.com/topic/308996-how-to-generate-complex-multi-color-gradients-with-php/#findComment-1568583 Share on other sites More sharing options...
Barand Posted July 22, 2019 Share Posted July 22, 2019 You might want to look at SVG gradients and SVG graphics in general. Quote Link to comment https://forums.phpfreaks.com/topic/308996-how-to-generate-complex-multi-color-gradients-with-php/#findComment-1568584 Share on other sites More sharing options...
LarsFlieger Posted July 22, 2019 Author Share Posted July 22, 2019 1 hour ago, requinix said: You should do this with Javascript and canvas, not PHP. But you'll still have to come up with the math to do what you want. I'm thinking parametric equations. Fun stuff. I think that is an good idea. I'll give myself a try later that day Quote Link to comment https://forums.phpfreaks.com/topic/308996-how-to-generate-complex-multi-color-gradients-with-php/#findComment-1568586 Share on other sites More sharing options...
cyberRobot Posted July 22, 2019 Share Posted July 22, 2019 There are some fairly complex things that you can do with CSS gradient backgrounds. Perhaps one of the following links will provide some inspiration: https://css-tricks.com/css3-gradients/ https://css-tricks.com/radial-gradient-recipes/ - the example near the bottom of the page, where they're talking about "multiple backgrounds", looks somewhat similar to the screenshots above Quote Link to comment https://forums.phpfreaks.com/topic/308996-how-to-generate-complex-multi-color-gradients-with-php/#findComment-1568587 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.