"“Under color of law” refers to actions taken by government officials (such as police officers or public officials) that are done in their official capacity but violate someone’s rights or are unlawful. These actions appear legal because the person is using their official authority, but in reality, they can be an abuse of power or a violation of laws or civil rights.
In the United States, such actions can lead to legal consequences under federal law, particularly 42 U.S. Code § 1983, which allows people to sue for civil rights violations committed under color of law." - ChatGPT