Page 1 of 1

[Solved][ModulateColor] How to make a colorizable image?

Posted: 08 Jun 2015, 18:17
by Darkminus
Hello!

I've got a question about how to use images with modulatecolor. (I'm noob at design, be kind with me.)

Let's say I have a 32px x 32px square with a color gradient in it. My goal would be to get an image which can be colorized with "any" color (because I want to use it with team/clublink color)

Is it possible to do this?

Sry if this is bad explained..

Thank you in advance for your answers! :thx:

Law.

Re: [ModulateColor] How to make a colorizable image?

Posted: 08 Jun 2015, 18:31
by undef.de
Image
Link: http://static.undef.name/ingame/info-ba ... layers.png

And then you can modulate it with "RRGGBB" to whatever you want.

EDIT: Code example:

Code: Select all

<quad posn="1.6 -1 0.03" sizen="5.25 5.25" modulatecolor="00AAFF" image="http://static.undef.name/ingame/info-bar/icon-players.png"/>

Re: [ModulateColor] How to make a colorizable image?

Posted: 08 Jun 2015, 18:41
by Darkminus
Hello :)

Thank you for your answer!

However that's not really the answer I was waiting for. I already used modulate color but with "nadeo" images which colorizes correctly.

In my case it is a small square, with a gradient (vertical, darker to brighter)

When I try to colorize it with modulatecolor, it goes all black. I wanna get it colorized with my team colors.

Here's an example of what I have :

http://i.imgur.com/iw3Iz3r.png

Here I use 2 images, my goal is to get one "generic" image to make it colored as I want. :)

I hope I explained it better!

Thank you :thx:

Re: [ModulateColor] How to make a colorizable image?

Posted: 08 Jun 2015, 19:24
by undef.de
For my "Tachometer" Plugin in UASECO i use this image Image
and modulate it with "FFF700" into yellow.

Re: [ModulateColor] How to make a colorizable image?

Posted: 08 Jun 2015, 20:14
by Darkminus
Interesting, this works correctly.

To make a "multi usage" image, I made a 1px width 500px height image, so I can make squares, rectangles, etc... with "any" width. But when I change color modulation, it goes black. Have you got an explaination for this? Maybe do I do something bad?

Re: [ModulateColor] How to make a colorizable image?

Posted: 08 Jun 2015, 21:12
by undef.de
Hmmm... maybe your PNG is not a PNG-24?

Re: [ModulateColor] How to make a colorizable image?

Posted: 09 Jun 2015, 10:41
by Dommy
You should create an greyscale image, where elements to be coloured are pure green (HUE must be green, saturation can be any).

When in script just use Vec3 CMlQuad::Colorize to change color of green elements (can modify to any color, even white).

Re: [ModulateColor] How to make a colorizable image?

Posted: 13 Jun 2015, 12:37
by Darkminus
Hello :)

I used the colorize attribute and now everything is ok.

Thank you for your help guys :thx: