In android pre Lollipop devices you can do it from SystemBarTintManager If you are using android studio just add Systembartint lib in your gradle file.
dependencies {
compile 'com.readystatesoftware.systembartint:systembartint:1.0.3'
...
}
Then in your activity
// create manager instance after the content view is set
SystemBarTintManager mTintManager = new SystemBarTintManager(this);
// enable status bar tint
mTintManager.setStatusBarTintEnabled(true);
mTintManager.setTintColor(getResources().getColor(R.color.blue));