Skip to content

Commit

Permalink
Convert green and gold colors in rgb to oklch color space
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelCDL committed Jan 23, 2023
1 parent dcb079e commit 019660f
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 18 deletions.
4 changes: 2 additions & 2 deletions scss/_link.scss
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ a[href^='https://sp.ucop.edu']::after {
}

a[data-wpel-link='external']::after {
background-color: rgb(var(--color-gold));
background-color: var(--color-gold);
mask-image: url('data-url:/fa-solid/arrow-up-right-from-square.svg');
}

a[href^='mailto:']::after {
background-color: rgb(var(--color-gold));
background-color: var(--color-gold);
mask-image: url('data-url:/fa-solid/envelope.svg');
}

Expand Down
2 changes: 1 addition & 1 deletion scss/_meet.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

a {
margin-block-start: var(--space2);
color: rgb(var(--color-light-gold));
color: oklch(86% 0.13 80); // lighter version of --color-gold for better a11y contrast against background
}

}
Expand Down
2 changes: 1 addition & 1 deletion scss/_news.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
flex: none;
block-size: 1rem;
inline-size: 1rem;
background-color: rgb(var(--color-gold));
background-color: var(--color-gold);
mask: url('data-url:/fa-solid/rss.svg') center / contain no-repeat;
}
}
Expand Down
2 changes: 1 addition & 1 deletion scss/_newsreel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
&:focus,
&:hover {
&::after {
background-color: rgb(var(--color-gold));
background-color: var(--color-gold);
}
}

Expand Down
2 changes: 1 addition & 1 deletion scss/_posttype.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
}

.c-posttype__post {
background-color: rgb(var(--color-green));
background-color: var(--color-green);
}
2 changes: 1 addition & 1 deletion scss/_quicklink.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
flex: none;
block-size: 1.1rem;
inline-size: 1.1rem;
background-color: rgb(var(--color-gold));
background-color: var(--color-gold);
mask: url('data-url:/fa-solid/arrow-up-right-from-square.svg') center / contain;
}
}
Expand Down
6 changes: 3 additions & 3 deletions scss/_slideshow.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
background-repeat: no-repeat;
background-position: center;
background-size: 0.8em;
color: rgb(var(--color-light-gold));
color: var(--color-gold);
cursor: pointer;

span {
Expand All @@ -71,7 +71,7 @@
flex: none;
block-size: 100%; // size relative to button size defined in '.c-slideshow__controls button' selector above
inline-size: 100%; // " "
background-color: rgb(var(--color-light-gold));
background-color: var(--color-gold);
mask-size: 0.7rem;
mask-position: center;
mask-repeat: no-repeat;
Expand Down Expand Up @@ -158,7 +158,7 @@

// if there's a link in the copy:
a {
color: rgb(var(--color-light-gold));
color: var(--color-gold);
text-decoration: underline;

&:focus,
Expand Down
2 changes: 1 addition & 1 deletion scss/_staff.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
flex: none;
block-size: 1.5rem;
inline-size: 1.5rem;
background-color: rgb(var(--color-gold));
background-color: var(--color-gold);
mask: url('data-url:/fa-solid/circle-user.svg') center / contain;
}

Expand Down
4 changes: 2 additions & 2 deletions scss/_status.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

&::before {
opacity: 1;
background-color: rgb(var(--color-green));
background-color: var(--color-green);
}

}
Expand All @@ -45,7 +45,7 @@

&::before {
opacity: 1;
background-color: rgb(var(--color-orange));
background-color: var(--color-gold);
}

}
Expand Down
8 changes: 3 additions & 5 deletions scss/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
// ***** Variables ***** //

:root {
// Colors in RGB:
// Colors in OKLCH:

--color-light-blue: oklch(94% 0.02 250);
--color-blue: oklch(45% 0.12 250);
--color-red: oklch(56% 0.22 30);
--color-dark-red: oklch(45% 0.18 30);
--color-orange: 255 153 0;
--color-green: 82 122 0;
--color-light-gold: 255 197 71;
--color-gold: 255 181 17;
--color-green: oklch(56% 0.16 135);
--color-gold: oklch(82% 0.16 80);

// Spacing:

Expand Down

0 comments on commit 019660f

Please sign in to comment.