/    Sign up×
Community /Pin to ProfileBookmark

Hiya,

general question.

If I have an image or graphics can I change the color with the image? and if i can is it possible change like a blue gradient to red ect?

to post a comment
PHP

6 Comments(s)

Copy linkTweet thisAlerts:
@stephan_gerlachauthorSep 13.2006 — anybody knows anything ? or maybe some tutorials ?
Copy linkTweet thisAlerts:
@bokehSep 13.2006 — It's possible. Bested way would be to create a second image with the same dimensions and pallete size. Adding the hue could be done either by stepping through the image pixel by pixel with a double for loop, reading the source pixel and appling some logic to the values and then saving as the destination pixel, or you could add a semi-transparent mask with [I]imagecopymerge()[/I] although there would be less control with that method.
Copy linkTweet thisAlerts:
@stephan_gerlachauthorSep 13.2006 — if the gradient would be only part of the image or grafic like an icon, would it be possible to change only the gradient color but leave the other colours the same?
Copy linkTweet thisAlerts:
@bokehSep 13.2006 — If there were a logical way to recognise the gradient from the rest, yes.
Copy linkTweet thisAlerts:
@stephan_gerlachauthorSep 13.2006 — cool I just had the idea.

generate 2 different images. 1 the graphic without the color i want to change and the other one just the part of the graphic of which I want to change the color. After changing the color I simply merge them an save it and Bingo.


Does that sound like its possible?
Copy linkTweet thisAlerts:
@bokehSep 13.2006 — It is possible to lay an image with a transparent background over another image and maintain the transparent areas so the base image shows through. [URL=http://bokehman.com/do_it_yourself_avatars/]Look at this![/URL]
×

Success!

Help @stephan_gerlach spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...