It is legal to install truck bed lights. Nevertheless, there are certain restrictions you have to keep in mind. The main limitation has to do with the colors.
If your lights flash red, blue, and yellow, that might confuse other motorists, leading them to think that your truck is an ambulance, fire fighting truck, or police vehicle. You might want to avoid that color combination.
Amazon and the Amazon logo are trademarks of Amazon.com, Inc, or its affiliates.