code: private void setupStyles() {
          TypedArray styledAttributes = obtainStyledAttributes(R.style.PinLock, R.styleable.PinLock);
  
          final int layoutBackground = styledAttributes.getColor(R.styleable.PinLock_backgroundColor, Color.WHITE);
          View layout = findViewById(R.id.pinLockLayout);
          layout.setBackgroundColor(layoutBackground);
  
          final int cancelForgotTextSize = styledAttributes.getInt(R.styleable.PinLock_cancelForgotTextSize, 20);
          cancelButton.setTextSize(TypedValue.COMPLEX_UNIT_SP, cancelForgotTextSize);
          forgetButton.setTextSize(TypedValue.COMPLEX_UNIT_SP, cancelForgotTextSize);
  
  
          final int cancelForgotTextColor = styledAttributes.getColor(R.styleable.PinLock_cancelForgotTextColor, Color.BLACK);
          cancelButton.setTextColor(cancelForgotTextColor);
          if(forgetButton.isEnabled()) {
              forgetButton.setTextColor(cancelForgotTextColor);
          } else {
              forgetButton.setTextColor(Color.parseColor("#a9abac"));
          }
  
          final int infoTextSize = styledAttributes.getInt(R.styleable.PinLock_infoTextSize, 20);
          final int infoTextColor = styledAttributes.getColor(R.styleable.PinLock_infoTextColor, Color.BLACK);
          label.setTextSize(TypedValue.COMPLEX_UNIT_SP, infoTextSize);
          label.setTextColor(infoTextColor);
      }
docs: Setting up color and textSize for cancel/forgot buttons and info text