You can go to Settings > System settings > Accessibility > Vision > Color inversion > Shortcut, to set by tapping the accessibility button and pressing the volume key to enable two shortcuts.
1. Accessibility button: Tap the accessibility button on the screen to enable the feature.
2. Press and hold the volume keys: Press and hold both volume keys simultaneously for 3 seconds to enable the function.