Does wire color matter in electronics?
The colors do not matter electrically. A wire is a wire is a wire, regardless of the color of their insulation. The color of the wire itself may matter when you get into higher voltages, but that's about the type of metal used (aluminum vs copper conductivity, for example).
The colors may matter, for readability, adhering to standards, legal compliance. But that normally doesn't apply to individual projects. You can use red for ground and black for power, just be aware that someone may see it and be confused. The led strip doesn't care about the color, but it will when someone thinks well, red is positive and black is ground so let me connect it the right way and something breaks when they connect it to the power source.
Wire colors are like comments in code, even for simple DIY projects. You're talking to your future self. When you take it apart in five years because it stops working, you will have forgotten everything about the original design, so it really helps to follow conventions. For industrial products it is vital to respect norms and conventions because many people may be involved in maintenance. This is also why we have silkscreen on boards, with testpoints labeled like "there should be 5V here".
Say I wanted to reverse the black and red wires on a LED strip connected to a battery, would it still function properly or not?
It will work fine until someone tries to troubleshoot it and says "Ha! There's your problem, the polarity is reversed!"
I've seen it happen. On another forum, a guy completely destroyed a very expensive synthesizer because the wiring colors did not match the polarity, and out of all the people trying to help him, none thought about the fact that the manufacturer had actually used a lot of power supplies which had been wired the wrong way.
Wire colour matters!
Not for the current running though the wire but for troubleshooting, safety, and others that may encounter any project. At powerline level voltages, national regulatory bodies have mandated the 'hot' line to be certain colours such as red for power (and orange, black, or brown in multi-phase power) and green or green/yellow striped as the grounded conductor.
In most low voltage DC systems I have encountered, red is positive and black is negative. It is so ingrained in our designs that people will assume it on a new system, and DIY products may only say 'connect red wire here'.
When you breadboard a new design, it will not matter electrically what colours you have chosen, but it is rare for me to have completed a moderately complex build without at least one error. To troubleshoot your design is so much easier if you are consistent with what colours you have used for what part of the circuit. Colour choices can be somewhat arbitrary, but for a DC system, keep red for positive, black for ground.
In other higher power systems, or RF, the wire colour or colour banding may be a manufacturing code that tells you what the internal makeup of the wire is. It could indicate insulation type (fire resistance, voltage rating) or conductor type (aluminum, copper, steel core) or other details. I worked in designing low voltage monitoring for high power systems. I was taught that red current only flows in red wires. Let me assure you that I have seen red current happily flowing in black wires until the molten copper explodes plating the room. I then kept the red current in the red wires.
Always assume that wire colours means something if you are working on an existing device, even if all it means is that this blue wire is a different circuit than that violet wire. I have been a broke student and wired electronic prototypes with the one roll of red hookup wire I had. They eventually worked but I paid in time troubleshooting. My professional work used national electrical code wire colours in large gauge but the low voltage signals used a different colour combination, but the wires were physically different which also helped separate them. And in production, each product was the exact same to simplify the repair department work.
So for your projects the positive and negative wires should have their own colour especially since this is where you often have to connect to external power, and then the signal(s) can have a third (or more) colour. If you have a small set of hookup wire spools, you can develop your own code particular to your projects; for example, blue for inputs, yellow for digital signals, violet for analog, and green for the output side. This will help you for years to come in troubleshooting. Remember that the colour is for your benefit and adjust your rules to your designs. If you keep the project, you can write the code down too.