sabine
November 21, 2023, 5:51pm
1
We’re looking to improve the code blocks in the OCaml.org :
opened 07:58PM - 15 Nov 23 UTC
good first issue
# Task
The color scheme for the code highlighting in the code blocks in the O… Caml.org Learn area could be better.
The current color scheme is this:
![Screenshot 2023-11-15 at 21-05-20 Transitioning to Multicore with TSan · OCaml Tutorials](https://github.com/ocaml/ocaml.org/assets/6594573/5a3a865e-206b-4b46-a28c-cbc17e21a375)
(https://ocaml.org/docs/multicore-transition)
```
span[class*="keyword"] {
color: #fede5d;
}
span[class*="constant"] {
color: #fabd2f;
}
span[class*="function-binding"] {
color: #36f9f6;
}
span[class*="variable"] {
color: #85ebeb;
font-style: italic;
}
span[class*="support"] {
color: #83a598;
}
span[class*="comment"] {
font-style: italic;
}
span[class*="literal"] {
color: #d3869b;
}
span[class*="string"] {
color: #b8bb26;
}
span[class*="numeric"] {
color: #ff5683;
}
```
Respond with a new color scheme. Color scheme must meet WCAG contrast requirements. (Use a WCAG checker, e.g. https://webaim.org/resources/contrastchecker/ to check.)
When we have more than one submission, let's do an elimination game where the different color schemes face off against each other: People vote to determine the better option in rounds of pairs of two until a single champion emerges.
For the showdown, we need one code block that exhibits all the different highlight colors. I haven't checked if the code block in question here has all of the colors. If it doesn't, we need another code block to show off everything.
You can post a color scheme on the GitHub Issue, and then we’re going to vote for a winner.
The voting will happen here on the OCaml Discuss.
1 Like
toastal
November 23, 2023, 6:45pm
2
It might just be me, but I find it very jarring to switch from a light theme for content & then dark theme for code syntax highlighting. May I suggest matching light with light & dark with dark?
1 Like
sabine
November 23, 2023, 7:06pm
3
Light mode submissions are very welcome.