Lighter color
#3

Код:
stock MakeColorLighter(color, percent)
{
	new 
		r, 
		g, 
		b, 
		Float:percentage = (100 - percent) + 0.1;
	
	Convert_HexToRGB(color, r, g, b);
	
	r = floatround(r * percentage / 100) + floatround(255 - percentage / 100 * 255);
	g = floatround(g * percentage / 100) + floatround(255 - percentage / 100 * 255);
	b = floatround(b * percentage / 100) + floatround(255 - percentage / 100 * 255);
	
	return Convert_RGBToHex(r, g, b);
}
Reply


Messages In This Thread
Lighter color - by MerryDeer - 15.02.2017, 13:39
Re: Lighter color - by SyS - 15.02.2017, 13:40
Re: Lighter color - by Rdx - 15.02.2017, 13:40
Re: Lighter color - by MerryDeer - 15.02.2017, 13:42
Re: Lighter color - by Rdx - 15.02.2017, 13:43
Re: Lighter color - by MerryDeer - 15.02.2017, 13:44
Re: Lighter color - by Rdx - 15.02.2017, 13:45
Re: Lighter color - by MerryDeer - 15.02.2017, 13:47
Re: Lighter color - by SyS - 15.02.2017, 13:47
Re: Lighter color - by Rdx - 15.02.2017, 13:48

Forum Jump:


Users browsing this thread: 1 Guest(s)