add C code color scheme

This commit is contained in:
anna 2021-12-18 21:51:39 +01:00
parent a19b820c71
commit acfb270812
Signed by: fef
GPG key ID: EC22E476DC2D3D84
2 changed files with 58 additions and 0 deletions

57
_sass/code.scss Normal file
View file

@ -0,0 +1,57 @@
/* Unfortunately, Jekyll's C parser is pretty rudimentary,
* so most of these values from my color scheme are unused */
$color-c-num: rgb(217, 154, 71);
$color-c-str: rgb(138, 189, 87);
$color-c-str-esc: rgb(141, 217, 210);
$color-c-key: rgb(251, 97, 230);
$color-c-op: rgb(251, 97, 230);
$color-c-func: rgb(86, 165, 255);
$color-c-type: rgb(48, 215, 152);
$color-c-param: rgb(149, 208, 208);
$color-c-memb: rgb(234, 227, 121);
$color-c-hash: rgb(148, 55, 255);
$color-c-macro: rgb(184, 123, 253);
$color-c-enum: rgb(232, 189, 225);
$color-c-comment: rgba(255, 255, 255, 0.45);
code {
font-family: "Comic Mono", "JetBrains Mono", "Roboto Mono", "SF Mono", "Source Code Pro", "Ubuntu Mono", monospace;
}
.language-c .highlight {
.nf, .f {
color: $color-c-func;
}
.s {
color: $color-c-str;
}
.se {
color: $color-c-str-esc;
}
.k, .kt {
color: $color-c-key;
}
.o {
color: $color-c-op;
}
.t {
color: $color-c-type;
}
.mi {
color: $color-c-num;
}
.cp {
color: $color-c-macro;
}
.cm {
color: $color-c-comment;
}
}

View file

@ -2,3 +2,4 @@
---
@import "style";
@import "code";