[0.15.30] Color Command Parameters
Posted: Tue Jul 18, 2017 5:30 am
There are a couple of unexpected behaviors with the color command.
First of all, typing /color with no parameters sets the player's color to black and prints the message: Your color is now . This is unexpected behavior because /help color specifies a parameter, and no color is returned. I personally would have assumed that /color would print out the player's current color, or spit out an error if no parameters were passed.
The help menu doesn't denote this, but passing 1 or more numbers seems to try to set the player's color according to (at least for the first 3) R, G, and B. Adding a fourth sometimes seems to be the alpha channel, but can also result in some unexpected colors that are not mirrored by the chat color. Additional parameters (regardless of number or text) do not affect color, but are returned in the Your color is now ###### message.
There is one more bug when providing integers for color. If one of the numbers is not in (0, 1] all the numbers are treated as values on the 0-255 scale. However, if they are <= 1, they are treated on a 0-1 scale. This causes some strange behavior which is demonstrated in my screenshots.
First of all, typing /color with no parameters sets the player's color to black and prints the message: Your color is now . This is unexpected behavior because /help color specifies a parameter, and no color is returned. I personally would have assumed that /color would print out the player's current color, or spit out an error if no parameters were passed.
The help menu doesn't denote this, but passing 1 or more numbers seems to try to set the player's color according to (at least for the first 3) R, G, and B. Adding a fourth sometimes seems to be the alpha channel, but can also result in some unexpected colors that are not mirrored by the chat color. Additional parameters (regardless of number or text) do not affect color, but are returned in the Your color is now ###### message.
There is one more bug when providing integers for color. If one of the numbers is not in (0, 1] all the numbers are treated as values on the 0-255 scale. However, if they are <= 1, they are treated on a 0-1 scale. This causes some strange behavior which is demonstrated in my screenshots.