md-switch.md-THEME_NAME-theme {
  .md-ink-ripple {
    color: '{{background-500}}';
  }
  .md-thumb {
    background-color: '{{background-50}}';
  }
  .md-bar {
    background-color: '{{background-500}}';
  }

  &.md-checked {
    .md-ink-ripple {
      color: '{{accent-color}}';
    }
    .md-thumb {
      background-color: '{{accent-color}}';
    }
    .md-bar {
      background-color: '{{accent-color-0.5}}';
    }
    &.md-focused .md-thumb:before {
      background-color: '{{accent-color-0.26}}';
    }

    &.md-primary {
      .md-ink-ripple {
        color: '{{primary-color}}';
      }
      .md-thumb {
        background-color: '{{primary-color}}';
      }
      .md-bar {
        background-color: '{{primary-color-0.5}}';
      }
      &.md-focused .md-thumb:before {
        background-color: '{{primary-color-0.26}}';
      }
    }

    &.md-warn {
      .md-ink-ripple {
        color: '{{warn-color}}';
      }
      .md-thumb {
        background-color: '{{warn-color}}';
      }
      .md-bar {
        background-color: '{{warn-color-0.5}}';
      }
      &.md-focused .md-thumb:before {
        background-color: '{{warn-color-0.26}}';
      }
    }
  }

  &[disabled] {
    .md-thumb {
      background-color: '{{background-400}}';
    }
    .md-bar {
      background-color: '{{foreground-4}}';
    }
  }
}
