Trying to set the primary color

1 reply · opened Jun 1, 2023

RroburdickJun 1, 2023

Hello, I have found a website that generates code to change the theme colors as per below. I tried placing in SAAS folder as custom.scss but it's not taking effect, can you help, maybe i have the wrong filename or location. Code is below

/*------------------------------------

  • COLOR primary
    ------------------------------------*/

$primary_t1: #0171bf;
$primary_t2: #00528c;
$primary_t3: #5fbdfe;
$primary_t4: #79c7fe;
$primary_t5: #002845;
$primary_t6: #00497d;
$primary_t7: #005b9b;
$primary_t8: #000a12;
$primary_t9: #8dd0fe;

$primary_shadow: rgba(1, 113, 191, 0.5);
$primary_text_color_dark_bright: #fff;

.alert-primary {
color: $primary_t5;
background-color: $primary_t9;
border-color: $primary_t4;
}

.alert-primary hr {
border-top-color: $primary_t3;
}

.alert-primary .alert-link {
color: $primary_t8;
}

.badge-primary {
color: $primary_text_color_dark_bright;
background-color: $primary_t1;
}

.badge-primary[href]:hover, .badge-primary[href]:focus {
color: $primary_text_color_dark_bright;
background-color: $primary_t2;
}

.bg-primary {
background-color: $primary_t1 !important;
}

a.bg-primary:hover, a.bg-primary:focus,
button.bg-primary:hover,
button.bg-primary:focus {
background-color: $primary_t2 !important;
}

.border-primary {
border-color: $primary_t1 !important;
}

.btn-primary {
color: $primary_text_color_dark_bright;
background-color: $primary_t1;
border-color: $primary_t1;
}

.btn-primary:hover {
color: $primary_text_color_dark_bright;
background-color: $primary_t7;
border-color: $primary_t2;
}

.btn-primary:focus, .btn-primary.focus {
box-shadow: 0 0 0 0.2rem $primary_shadow;
}

.btn-primary.disabled, .btn-primary:disabled {
color: $primary_text_color_dark_bright;
background-color: $primary_t1;
border-color: $primary_t1;
}

.btn-primary:not(:disabled):not(.disabled):active, .btn-primary:not(:disabled):not(.disabled).active, .show > .btn-primary.dropdown-toggle {
color: $primary_text_color_dark_bright;
background-color: $primary_t2;
border-color: $primary_t6;
}

.btn-primary:not(:disabled):not(.disabled):active:focus, .btn-primary:not(:disabled):not(.disabled).active:focus, .show > .btn-primary.dropdown-toggle:focus {
box-shadow: 0 0 0 0.2rem $primary_shadow;
}

.btn-outline-primary {
color: $primary_t1;
background-color: transparent;
border-color: $primary_t1;
}

.btn-outline-primary:hover {
color: $primary_text_color_dark_bright;
background-color: $primary_t1;
border-color: $primary_t1;
}

.btn-outline-primary:focus, .btn-outline-primary.focus {
box-shadow: 0 0 0 0.2rem $primary_shadow;
}

.btn-outline-primary.disabled, .btn-outline-primary:disabled {
color: $primary_t1;
background-color: transparent;
}

.btn-outline-primary:not(:disabled):not(.disabled):active, .btn-outline-primary:not(:disabled):not(.disabled).active, .show > .btn-outline-primary.dropdown-toggle {
color: $primary_text_color_dark_bright;
background-color: $primary_t1;
border-color: $primary_t1;
}

.btn-outline-primary:not(:disabled):not(.disabled):active:focus, .btn-outline-primary:not(:disabled):not(.disabled).active:focus, .show > .btn-outline-primary.dropdown-toggle:focus {
box-shadow: 0 0 0 0.2rem $primary_shadow;
}

.list-group-item-primary {
color: $primary_t5;
background-color: $primary_t4;
}

.list-group-item-primary.list-group-item-action:hover, .list-group-item-primary.list-group-item-action:focus {
color: $primary_t5;
background-color: $primary_t3;
}

.list-group-item-primary.list-group-item-action.active {
color: $primary_text_color_dark_bright;
background-color: $primary_t5;
border-color: $primary_t5;
}

.table-primary,
.table-primary > th,
.table-primary > td {
background-color: $primary_t4;
}

.table-hover .table-primary:hover {
background-color: $primary_t3;
}

.table-hover .table-primary:hover > td,
.table-hover .table-primary:hover > th {
background-color: $primary_t3;
}

.text-primary {
color: $primary_t1 !important;
}

a.text-primary:hover, a.text-primary:focus {
color: $primary_t2 !important;
}

SSemicolon WebSTAFFJun 3, 2023

Hello,

This should be no problem but you will need to manually regenerate CSS if you are using SCSS as we cannot see you custom codes in the style.css File, else you will simply need to paste the generated codes in the css/custom.css File directly.

This will definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard