I have been working on developing online courses using a template created by another developer in SCSS and vue.js. The color scheme of the template is based on the SCSS variables $primary
and $secondary
. I am considering adding a color-blind option that would allow users to switch between complementary colors for Normal, Deuteranopia, and Tritanopia spectrums.
This is still in the design prototype phase, but my idea is to have circular color options in a dropdown menu that can change the primary color of the entire page when clicked.
https://i.sstatic.net/1ut0h.png
Since I am not very familiar with vue and scss, I am uncertain about how to implement this. My plan is to update the $primary: "";
variable based on the user's selection. For example:
$(".changePrimaryColor").click(function(){
$primary == $theme-blue;
});
I am also considering incrementing the value of $primary
by 1 or 2 depending on the user's choice, but I am unsure about the specifics.
Any suggestions or guidance would be greatly appreciated! Thank you!
// Theme colors
$theme-green: #c4d600;
$theme-blue: #1a397c;
$theme-red:#9b1717;
$primary: $theme-green;
$secondary: $theme-red;
$success: #288515;
$danger: #a61616;
$warning: #efa92c;
$theme-colors: (
"primary": $primary,
"secondary": $secondary,
"success": $danger,
"danger": $success,
"warning": $warning,
);
<script src="https://cdnjs.cloudflare.com/ajax/libs/sass.js/0.9.2/sass.min.js"></script>