I'm struggling to find a way to adjust the background color of the "checked" state for this toggle switch in Bootstrap 4. It utilizes an additional library for toggling between dark and light modes - you can find it here on github. While that functionality is working fine, my main issue is changing the default blue background color when the checkbox is checked. I'm not sure if this blue color is coming from the default Bootstrap CSS. The solution provided in this answer Change Bootstrap 4 checkbox background color didn't quite do the trick as it only altered the unchecked color but not the checked color.
You can view the fiddle demonstration here.
Here's the code snippet:
.custom-control-input {
background-color: red;
}
<link rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="darkSwitch" />
<label class="custom-control-label" for="darkSwitch">Dark Mode</label>
</div>