blog/src/styles/_colors.scss

79 lines
2.6 KiB
SCSS

@media (prefers-color-scheme: light) {
$backgroundColor: white;
$textColor: #15202b;
$linkColor: royalblue;
:root {
--background-color: #{$backgroundColor};
--faded-background-color: #{darken($backgroundColor, 10%)};
--shadow-color: #{darken($backgroundColor, 10%)};
--heading-color: #{darken(royalblue, 10%)};
--text-color: #{$textColor};
--small-text-color: #6e707f;
--smaller-text-color: #{lighten($textColor, 30%)};
--faded: lightgray;
--hr-color: lightgray;
--link-color: #{$linkColor};
--link-hover-color: #{lighten($linkColor, 35%)};
--code-color: firebrick;
--tag-color: #{lighten($linkColor, 35%)};
// Admonition
--note-color: #{$linkColor};
--note-background-color: var(--link-hover-color);
// Syntax Highlighting
--astro-code-color-text: #24292e;
--astro-code-color-background: inherit;
--astro-code-token-constant: #005cc5;
--astro-code-token-string: white;
--astro-code-token-comment: #6a737d;
--astro-code-token-keyword: #d73a49;
--astro-code-token-parameter: #24292e;
--astro-code-token-function: var(--astro-code-color-text);
--astro-code-token-string-expression: #032f62;
--astro-code-token-punctuation: #000007;
--astro-code-token-link: white;
}
}
@media (prefers-color-scheme: dark) {
$backgroundColor: #202030;
$textColor: #cdcdcd;
$linkColor: lightskyblue;
$linkHoverColor: #202749;
:root {
--background-color: #{$backgroundColor};
--faded-background-color: #{lighten($backgroundColor, 10%)};
--shadow-color: #{lighten($backgroundColor, 10%)};
--heading-color: #{lighten(lightskyblue, 20%)};
--text-color: #{$textColor};
--small-text-color: #{darken($textColor, 8%)};
--smaller-text-color: #{darken($textColor, 12%)};
--faded: #666;
--hr-color: gray;
--link-color: #{$linkColor};
--link-hover-color: #{$linkHoverColor};
--code-color: #{lighten(firebrick, 25%)};
--tag-color: #{darken($linkColor, 55%)};
// Admonition
--note-color: #{$linkColor};
--note-background-color: var(--link-hover-color);
// Syntax Highlighting
--astro-code-color-text: #e1e4e8;
--astro-code-color-background: inherit;
--astro-code-token-constant: #79b8ff;
--astro-code-token-string: #9ecbff;
--astro-code-token-comment: #6a737d;
--astro-code-token-keyword: #f97583;
--astro-code-token-parameter: #e1e4e8;
--astro-code-token-function: var(--astro-code-color-text);
--astro-code-token-string-expression: #85e89d;
--astro-code-token-punctuation: #ffab70;
--astro-code-token-link: black;
}
}