SyntaxBomb - Indie Coders

Languages & Coding => BlitzMax / BlitzMax NG => Topic started by: Yellownakji on May 09, 2019, 02:53:45 PM

Title: Shifting color hue?
Post by: Yellownakji on May 09, 2019, 02:53:45 PM
Hi.

I'm trying to achieve a 'hue shift' pattern.    Not exactly a "setcolor" to a greyscaled image but to shift a colored image's colors.

Anybody have an appropriate method for this technique?
Title: Re: Shifting color hue?
Post by: Derron on May 09, 2019, 03:13:29 PM
Realtime or a color algorithm?

In my framework there is the code to convert rgb to hsv or other colors
https://github.com/GWRon/Dig/blob/master/base.util.color.bmx

so you can simply read each color and manipulate the color then to your needs.


Of course this wont work in realtime for bigger pictures.

bye
Ron
Title: Re: Shifting color hue?
Post by: Yellownakji on May 09, 2019, 03:25:17 PM
Realtime or a color algorithm?

In my framework there is the code to convert rgb to hsv or other colors
https://github.com/GWRon/Dig/blob/master/base.util.color.bmx

so you can simply read each color and manipulate the color then to your needs.


Of course this wont work in realtime for bigger pictures.

bye
Ron


Real-time.   I would like my logo to utilize a rainbow hue effect, instead of just making every letter change color via setcolor.    I'm trying to get every frame to shift the color by 0.4.
Title: Re: Shifting color hue?
Post by: Derron on May 09, 2019, 04:02:25 PM
Use shaders (eg with mojo of mky.mod).

Or trick with some overlay images (tinting the underlaying stuff, mix with another blendmode like Lightblend).


bye
Ron
Title: Re: Shifting color hue?
Post by: Henri on May 09, 2019, 04:50:24 PM
Hi,

there is something to this effect in Bmax samples folder: Samples / flameduck / Circlemania.

-Henri
Title: Re: Shifting color hue?
Post by: Yellownakji on May 18, 2019, 05:36:36 PM
Hi,

there is something to this effect in Bmax samples folder: Samples / flameduck / Circlemania.

-Henri

Not quite what i'm looking for.  It was very messy to compile in NG, as well.

I'm not really going to waste any more time on this effect.   What i have done is written my own replacement for SetColor(), which uses superior HSV instead of RGB.   I'm just done with RGB.