1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
[[!meta title="Colour your Emacs with ease"]]
[[!meta copyright="Copyright © 2024 Ryota Sawada"]]
[[!inline pages="internal(2024/info/color-nav)" raw="yes"]]
<!-- Initially generated with emacsconf-publish-talk-page and then left alone for manual editing -->
<!-- You can manually edit this file to update the abstract, add links, etc. --->
# Colour your Emacs with ease
Ryota Sawada (he/him) - Pronunciation: Ree-yo-tah, https://hachyderm.io/@rytswd https://x.com/rytswd
[[!inline pages="internal(2024/info/color-before)" raw="yes"]]
Emacs comes with various themes to pick from, and there are myriad
different themes out on the Internet. After choosing a theme, you can make
any adjustments to add or remove certain colours exactly as you wish. Emacs
provides you so much control over how you work, write, code, and everything
in between, including the colour choice. You are certainly left equipped
with all the controls for your theme as well.
However, when it comes to colour, there is a bit of difficulty: RGB.
Hexadecimal colour codes are ubiquitous and relatively easy to understand.
Yet, they are difficult to work with, especially when you need to make
different shades and variants. In recent years, CSS started to support not
just sRGB (standard RGB), but other colour spaces such as HSL, Oklab, etc.
With Emacs, we also have a great set of tools from color.el, as well as
this amazing package called ct.el (<https://github.com/neeasade/ct.el>)
In this talk, we will have a quick look at different colour spaces than
sRGB, namely HSL and LCH. We will check out how ct.el can make a set of
colour shades and variants at ease, and how they can help define themes.
Finally, Ryota will share his own theme called Hasliberg Theme, which is
using the full power of LCH.
Resources (will be public starting Dec 7):
- <https://codeberg.org/rytswd/emacsconf-2024>
- <https://github.com/rytswd/hasliberg-theme>
About the speaker:
Ryota started his Emacs journey more than a decade ago, but was forced to
put it aside for work requirements soon after. A few years ago, he made a
return to Emacs, and now is using Emacs almost exclusively for any sort of
coding tasks. This talk focuses on the modern Emacs setup where he thinks
his Emacs looks and works better than many other editors. He works for Civo
as a Principal Engineer.
# Discussion
## Questions and answers
- Q: Is there any intention to create a library for working with more
experimental color spaces? Pulling code out of Hasliberg for this
purpose, perhaps?
- A: Started the journey just for myself, and didn't think this
would be useful for others.
- A: Making it a library is definitely something that I can think
about.
- Q: Can we have a dark as well as light theme variations made from
your theme?
- A: You can customize the code easily into dark, light and change
something based on someone's mood. Keep in mind that it is a
personal theme, so customize as you see fit.
## Notes
- \<ElephantErgo\> Great talk! Thank you 🙂
- \<jsiegel62\> Excellent talk, thanks! \[11:33\]
- \<codeasone\> Beautiful theme
- \<inkpotmonkey\> Interesting idea to be inspired from tailwind and
frontend dev, thanks for talk \[11:34\]
- \<@sachac\>
[https://github.com/alphapapa/prism.el](https://github.com/alphapapa/prism.el)
has some interesting colour experiments as well
- \<polezaivsani\> i felt about same with the christmas tree colored
code editor
- sachac: annoyance is a great motivator for learning Emacs Lisp
- sachac: Yay fellow Dvorak user!
- \<neil\> :
[https://github.com/rytswd/hasliberg-theme](https://github.com/rytswd/hasliberg-theme)
- Thanks :)
- \<ryota\> Thank you everyone for tuning in! Also my slides are
available at
[https://codeberg.org/rytswd/emacsconf-2024](https://codeberg.org/rytswd/emacsconf-2024)
[[!inline pages="internal(2024/info/color-after)" raw="yes"]]
[[!inline pages="internal(2024/info/color-nav)" raw="yes"]]
|