Minecraft wiki entry for World_border, associated text: /worldborder warning distance <sizeInBlocks>
Causes the screen to be tinted red when the player is within the specified number of blocks from the world border. The default is 5 blocks. The tint does not display if the user is using fast graphics.