mpalmer12345
Programmer
What happens when you feed numbers higher than 255 into the three hex slots of a font color (strColor)? I am getting some pretty, but unpredictable, effects I would like to reproduce, if possible, but within a setting where the values are within the proper range and won't produce error messages.
strColor = "#" + RedHex + GreenHex + BlueHex
So if color1 = 255 it keeps being incremented, which makes it rise above 255!
function fnNextColor(color1, color2) {
if (color1 < color2)
{
NextColor = color1 - 1;
} else
{
NextColor = color1 + 1;
}
return NextColor;
}
Then turn NextColor into hex color value, RedHex etc.
strColor = "#" + RedHex + GreenHex + BlueHex
So if color1 = 255 it keeps being incremented, which makes it rise above 255!
function fnNextColor(color1, color2) {
if (color1 < color2)
{
NextColor = color1 - 1;
} else
{
NextColor = color1 + 1;
}
return NextColor;
}
Then turn NextColor into hex color value, RedHex etc.