So why is the color change "permanent"?
#2
I haven't check code yet but you might want to use _Unsigned Long for the Type to hold color values AND use _RGB32 instead of _RGB() which just matches to closest RGB value in an older screen mode ie NOT using _NewImage( wide, High, 32) to setup graphics screen. 

OK you are using  _NewImage so _RGB32() would be better, maybe I have I backwards don't use RGB32 with old screen modes? I just go by Rule if you use 32 to setup screen, use _RGB32.

OK I confess I don't understand what you are trying in Brighter& but suffix should be ~& to cover all colors including alpha.

I use this for gradually going (by fractions) from one color to another:

Code: (Select All)
Function midInk~& (r1%, g1%, b1%, r2%, g2%, b2%, fr##)
    midInk~& = _RGB32(r1% + (r2% - r1%) * fr##, g1% + (g2% - g1%) * fr##, b1% + (b2% - b1%) * fr##)
End Function

r1, g1, b1 is the RGB at the start when fraction fr## is 0 and r2, g2, b2 is the "Goal" color when fr## = 1 so anything between 0 and 1 for fr## is an in between color value eg fr## = .2 closer to start color r1,g1, b1 and fr ## = .8 closer to r2, g2, b2

The brightest color is _RGB32(255, 255, 255, 255) and & Type wont contain it.
b = b + ...
Reply


Messages In This Thread
RE: So why is the color change "permanent"? - by bplus - 04-24-2022, 02:12 PM



Users browsing this thread: 1 Guest(s)