[Tutorial] 32-bit colours (or hexadecimal colours like 0xFF0000FF)
#3

clamp
This is a very good function to reset colors in range.

Also, you can checkout this method for changing a color's transparency (in context to your 'lighten' function):
pawn Code:
stock lighten(color, alpha)
{
    return (color & ~0xFF) | alpha;
}
Reference: https://sampwiki.blast.hk/wiki/Colors_List
Reply


Messages In This Thread
32-bit colours (or hexadecimal colours like 0xFF0000FF) - by Alcatrik - 03.02.2016, 23:27
Re: 32-bit colours (or hexadecimal colours like 0xFF0000FF) - by TwinkiDaBoss - 03.02.2016, 23:45
Re: 32-bit colours (or hexadecimal colours like 0xFF0000FF) - by Gammix - 03.02.2016, 23:58
Re: 32-bit colours (or hexadecimal colours like 0xFF0000FF) - by perfectboy - 05.02.2016, 16:45
Re: 32-bit colours (or hexadecimal colours like 0xFF0000FF) - by FYR - 05.02.2016, 19:28

Forum Jump:


Users browsing this thread: 1 Guest(s)