Input: A valid 6 HEX digit color code wihout a # prefix
Your job is to find to which one of these:
Red: FF0000 Green: 00FF00 Blue: 0000FF White: FFFFFF Black: 000000
the input color is the closest too, in this case you try to only match it to black or white when the RGB is the same value for all 3 (the color is grey, or black or white ofc), if there is a "tie" you can pick whichever
The output is one of the aforementioned color codes. Examples:
Input: FF0000, Output: FF0000 Input: F10000, Output: FF0000 Input: 22FF00, Output: 00FF00 Input: FFFF00, Output: FF0000 or 00FF00 Input: 111112, Output: 0000FF Input: 010101, Output: 000000 Input: A0A0A0, Output: FFFFFF
This is code-golf, so fewest bytes will win!