if (textView.getBackground() instanceof ColorDrawable) { ColorDrawable cd = (ColorDrawable) textView.getBackground(); int colorCode = cd.getColor(); }