         passcodeTextField.clearButtonMode = UITextField.ViewMode.whileEditing
         passcodeTextField.delegate = self
         passcodeTextField.addTarget(self, action: #selector(self.passcodeTextFieldDidChange(_:)), for: UIControl.Event.editingChanged)
-        self.view.backgroundColor = UIColor.white
         passcodeTextField.translatesAutoresizingMaskIntoConstraints = false
         self.view.addSubview(passcodeTextField)
         self.passcodeTextField = passcodeTextField
+
+        if #available(iOSApplicationExtension 13.0, *) {
+            view.backgroundColor = .systemBackground
+            passcodeTextField.backgroundColor = .secondarySystemBackground
+            passcodeTextField.textColor = .secondaryLabel
+        } else {
+            view.backgroundColor = .white
+        }
 
         let biometryAuthButton = UIButton(type: .custom)
         biometryAuthButton.setTitle("", for: .normal)

        let passcodeLabel = UILabel(frame: CGRect(x: 0, y: 0, width: 300, height: 40))
        passcodeLabel.text = "EnterPasscode".localize()
        passcodeLabel.font = UIFont.boldSystemFont(ofSize: 18)
        passcodeLabel.textColor = UIColor.black
        passcodeLabel.textAlignment = .center
        passcodeLabel.translatesAutoresizingMaskIntoConstraints = false
        self.view.addSubview(passcodeLabel)


        let passcodeWrongAttemptsLabel = UILabel(frame: CGRect(x: 0, y: 0, width: 300, height: 40))
        passcodeWrongAttemptsLabel.text = ""
        passcodeWrongAttemptsLabel.textColor = Globals.red
        passcodeWrongAttemptsLabel.textAlignment = .center
        passcodeWrongAttemptsLabel.translatesAutoresizingMaskIntoConstraints = false
        self.view.addSubview(passcodeWrongAttemptsLabel)
