Add the following custom style in styles.xml
And then add the style as theme while declaring the switch in xml like following
<style name="SwitchCompatCustom">
<item name="colorControlActivated">@color/desired_color</item>
</style>
And then add the style as theme while declaring the switch in xml like following
<android.support.v7.widget.SwitchCompat
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:theme="@style/SwitchCompatCustom
"/>