After researching various options, I have discovered what I consider to be the most refined solution: Compiling bootstrap.css
Here are the steps:
1.) First, you need to install a Sass compiler. I personally used npm for installation with the command npm install -g sass
2.) Next, download the latest version of Bootstrap source code. For example, you can get Bootstrap 5.2 by visiting Bootstrap 5.2 and clicking on "Download source"
3.) Create a folder, unzip the files, and organize them in a folder named 'bootstrap' with the following structure:
your-project/
├── scss
│ └── custom.scss
└── bootstrap/
├── js
└── scss
source
4.) Now, create a custom style file like this:
// Custom.scss
// Option A: Include all of Bootstrap
// Add any default variable overrides here (functions won't be available)
// Default variable overrides
$primary: #216487;
$secondary: #4f616e;
$danger: #ba1a1a;
$body-bg: #f6fafe;
@import "../bootstrap/scss/bootstrap";
// Then, customize further if needed
5.) Compile the bootrap.css by running the command
sass .\custom.scss .\bootstrap.css
The resultant bootstrap.css file can be utilized as a replacement for the pre-compiled bootstrap.css file, offering a personalized color palette.
Execute the command to implement these changes