You have to provide a custom style id in the AlertDialog constructor:
AlertDialog.Builder(Context context, int themeResId)
and the style file should be something like:
<style name="AlertDialogCustom" parent="Theme.AppCompat.Light.Dialog.Alert">
<item name="android:colorAccent">#0000FF</item>
</style>