Among other things, face recognition cannot work in dark environments because there is not enough light for reliable recognition, and starting with ColorOS 7 there is an "Auto brighten screen fpr Face unlock" function that can help with this.
- Open the Settings
- Tap on Fingerprint, face & password
- Tap on Face
- Enter your current Password/PIN/Pattern
- Enable or Disable Auto brighten screen for Face unlock