Skip to content

Commit

Permalink
Add purple accent option
Browse files Browse the repository at this point in the history
  • Loading branch information
ahosgood committed Dec 9, 2024
1 parent af6058d commit 8180730
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
13 changes: 13 additions & 0 deletions src/nationalarchives/tools/_colour.scss
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,19 @@
@extend %blue-accent;
}

%purple-accent {
--accent-background: #{colour.brand-colour("purpled")} !important;
--accent-background-light: #{colour.brand-colour("pastel-purple")} !important;
--accent-border: #{colour.brand-colour("purple")} !important;
--accent-list-marker: #{colour.brand-colour("purple")} !important;
--button-accented-background: #{colour.brand-colour("purpled")} !important;
}

@mixin purple-accent {
@extend %accent-lighter-text;
@extend %purple-accent;
}

@mixin on-high-contrast {
@media (prefers-contrast: more) {
@content;
Expand Down
8 changes: 8 additions & 0 deletions src/nationalarchives/utilities/colour/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
&--blue-accent {
@include colour.blue-accent;
}

&--purple-accent {
@include colour.purple-accent;
}
}

.tna-background {
Expand Down Expand Up @@ -100,4 +104,8 @@
&-blue {
@include colour.blue-accent;
}

&-purple {
@include colour.purple-accent;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const accents = [
"tna-accent-yellow",
"tna-accent-green",
"tna-accent-blue",
"tna-accent-purple",
"tna-accent-black",
];

Expand Down
5 changes: 4 additions & 1 deletion src/nationalarchives/variables/_colour.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,21 @@ $colour-palette-brand: (
"orange": #fd3f03,
"green": #86bc25,
"blue": #00b0ff,
"purple": #ca26d9,

"brown": #654e37,
"maroon": #9c193a,
"chestnut": #8f3415,
"forest": #00623b,
"navy": #004c7e,
"purpled": #4f1655,

"cream": #f9f7e2,
"pastel-pink": #fad3d4,
"pastel-orange": #f9e1bc,
"cream": #f9f7e2,
"pastel-green": #dde5d5,
"pastel-blue": #d4e5ef,
"pastel-purple": #eed6f0,
);

@function hex-to-rgb($hex, $opacity: 1) {
Expand Down

0 comments on commit 8180730

Please sign in to comment.