00:02.140 Introduction
00:48.820 Deviant
01:15.640 FlucUI
02:51.910 Lab
05:25.090 NotInk: grayscale
06:13.930 Random theme
06:50.020 Monte Carlo
07:19.780 How to pick a random color palette
08:12.070 XYZ
00:33.865 Q: When you choose colors based on the same lightness, does it not hurt readability since the eye sees lightness most?
01:52.280 Q: For monte-carlo, are all the "random" colors picked using a colorwheel/hue rotation?
02:43.720 Q: One area I see emacs able to do themes that is "underused?" is changing the font
08:53.461 Q: Have you ever kept any of the random themes that were thrown up?
In this talk I will share my experience of finding and creating the
“perfect” Emacs theme. I will go through the five themes I have
created and discuss the motivations and ideas behind them, which will
also introduce various color spaces. And I will look into the future
to see if there is hope to find the "perfect" theme.
About the speaker:
I'm a long time Emacs user (since Emacs 21). I don't write a lot of
elisp but I'm spend vast majority of my screen time with Emacs, and
I'm picky about how it looks. This talk shows how may hoops I'm
willing to jump through to make it look "right".
Discussion
Questions and answers
Q: When you choose colors based on the same lightness, does it not
hurt readability since the eye sees lightness most?
A:
Q: One area I see emacs able to do themes that is "underused?" is
changing the font. font size, font typee, monospace or perpotional,
bold. based on the varios faceets of emacs. Is it a magit issie a
code comment a code string or varible name etc...
A:
Q:
A:
Q: For monte-carlo, are all the "random" colors picked using a
colorwheel/hue rotation?
A:
Q: Have you ever kept any of the random themes that were thrown up?
A: No. When Emacs picks monte carlo by chance, I wouldn't know
about it. That's why I didn't keep any of the themes it
generated.
Hi my name is MetroWind.In this talk I will take you through my journey into Emacs themes.I am a long-time Emacs user. I started usingEmacs since version 21.The goal of this talk is to inspire more people into making themes.Maybe you are already making themes.In that case I hope you could find some tips and tricksyou know in this oneI will basically go through all the themesthat I created.But I think the most important thinghere is to understand why some ofthe some of the colors are picked,and the motivations behind them.
So the first theme I created iscalled Deviant. It looks like this.The inspiration for this one is awebsite called DeviantArt. Basically I justuse their color palette, you know, from their design.It was a like a community for indie artists.I was really into that, you know,back in the day so that’s that.
Otherwise, nothing special. The next themeI created was called FlucUIIt’s in MELPA.And let me just show you.So yeah that's how it looks like.So... but where where did the colorscome from, right? To understand that,I'll need to take you back in time, you know, to where iOS 7was released by Apple. That was abig deal, because that popularized the ideaof flat UI color designs; sorry, flat UIdesigns. And after that, everybody followed suit,and changed their design, you knowof all of their websites and applications to use some sort of flat UI design concepts.And about the same time, there came a website called flatuicolors.com.It hosted one color palette,and that was really good!So I picked that as the basis of my theme.And initially I named it FlatUI,But that name was taken in MELPASo i just rename it to something random, FlucUI.
The next one is called lab.To understand why I needed to create the theme,it's because I thought some of the colors in FlucUIwas standing out too much, like the green here.This one.I thought this was too bright.Just a little bit.So I thought I needed way to picksome colors that are about the samelightness essentially. So how would I do that?The answer is to go into a color space called LAB.Now normally you'd do color work in RGB,which is red, green, and blue.It doesn't tell you a lot about lightness.If you do a pure blue,it actually looks a lot darker than apure red or pure green. So thatthat doesn't work. But in LAB,thing are different, because one of the channelis L which is lightness. The othertwo channels are a and b, which are justfor colors. This is great becauseI could just fix L meaningI fixed the lightness, and then I canvary a and b however I want.The color will stay roughly in the samelightness, which is exactly what I wanted.So for that I created aMac app, where I could justfix lightness like I said, and thenI could click on this colorful thing,to pick a color. The app willpick another five according to some pattern.And then I could just like hard-codethese colors in Emacs.Let me show you.apply theme... lab...Yeah not very different from FlucUI colors,which was intentional.The idea here again isall the colors will be in aboutthe same lightness, which I guess it was.So yeah... So this one wasa success. I use it for areally long time. And then I got bored...
So I needed something interesting.The idea at the time was then to create a themethat doesn't have any colors essentially.A grayscale theme. So I calledit NotInk. It is also in MelpaIt looks like this.Yeah like I said, everything is grey.There's no color. But to mysurprise, this is actually very useable.I didn't have any problem in readability;I didn't have any problem distinguishing, you know,different elements in the code. So abig surprise. And also a big success actually.And then I got bored.
I just decided to install a whole bunchof themes from MELPA,and every time I start Emacs Ijust pick a random theme.There are some caveats to that,which I don't want to get into.But let me just show you.apply-random-theme, so it picked one forme. And then it picked another... another...So yeah.It's an interesting setup. I'm still usingthis setup today. Actually a good oneWalls of text...
Now the final theme I want to look into,which is the latest, is called Monte Carlo....which you know, idea here is tobring the idea of picking a randomtheme to the next level.So this is just one theme that generatesa random color palette for me everytime.Not in MELPA, because I'm not ...I'm not completely satisfied with it.
But anyway... How do I... How do I picka random color palette right?The answer is again to look at a different color space.This time it's called HLC, which is hue,lightness, and chroma. So hue is justcolors, red, green, blue, or yellow, whatever.Lightness is lightness. Chroma is saturation,essentially. This is great because I couldfix both lightness and saturation, and onlyvary in hue to pick my colors.Now the problem isonce I have the color palette inHLC, how would I convert it tosRGB, because Emacs only knowsabout colors in sRGB.
The answer here is to go throughanother color space called XYZ.This is an extremely important color space,because basically all other color spaces aredefined on top of XYZ.So you would have like transformationsfrom XYZ to all othercolor spaces. Now if you invert thisthese transformations, you could go from,for example, HLC back into XYZand then go to another colorspace of your choosing, right.So this is how to convert colorsbetween color spaces. In this case,I have to convert colors from HLCto LAB, and from LAB to XYZ,and from XYZ to sRGB.So this time the conversions areall done in Emacs Lisp, and Ihave the code in here in this URL.You could take a look, or youcould actually just use maybe some packageto convert colors.Anyway let me show you howthis works. So in this case Icould apply theme, Monte Carlo.So this is now a random theme.Actually, well, a theme with random colors,because I could apply the same theme,and it will look different.Every time.I could also look at the colors it picked.as a list of colors.I could also look at this likefancy chart of colors. This istoo small. So let me show you this.So basically the same thing.This is actually a cross-section in HLC space,and the colors it picked are these likewhite circles.So that's that.But like I said, I'm notfully satisfied, because most of time thecolors are pretty boring from it.I could think of someways to improve this. For example Icould choose different patterns for the colorsamples. but I don't know of anygood patterns. So I need to trythings out. And then another way isprobably to use different color spaces like the HSL, or HSV.Again I need to try this out.So yeah there are room for improvements.If you... If you have and idea,you know, let me know, and wecan try it out.So that's the end of my talk.Hopefully you have some new ideas.Thanks for listening in, and yeah.Go create more themes because we can't have enough.Thanks!
Q&A transcript (unedited)
So just to be clear, right now we are currently streaming. Soif you want to answer with your voice, you can as well. Oh, I'msorry. Okay. Yeah. So I've got a question. I think there was alittle bit of a misunderstanding with whether we were doinga Q&A on BBB or if we were doing it on Etherpad. So it's reallyup to you. Right now we've set up everything. So if you want tostart answering questions with your voice, we might aswell. So OK, so I can just do it live.
[00:00:33.865]Q: When you choose colors based on the same lightness, does it not hurt readability since the eye sees lightness most?
So one question is, so Iassume this is a question on the lab space, where all thecolors are the same lightness. Does it hurt readability? Sofar, I find it to be OK. For the lab theme, I picked the colorsmanually. So like I could just fix a angle essentially sothat no colors are similar, so I have good readability. Butfor a random theme in Monte Carlo, it's hard because likeit's just random. But yeah, that's a really good point. Andalso that's one of the motivations I did the nothing, youknow, the great scale theme to explore just usinglightness. Yeah.So looking at other questions.Okay, great. Do you want to take the next question. So, okay.
[00:01:52.280]Q: For monte-carlo, are all the "random" colors picked using a colorwheel/hue rotation?
Okay, let's go to the third first. Let's finish. Yes, forMonte Carlo are all the random colors that using a colorwheel here. Yes. Well, so basically, what this theme does isit. It picks a saturation and lightness for me first. Theseare also random, but they are picked with some kind of range.And that's a parameter that I can play with, you know, therange of lightness and separation.Once those are fixed, the colors are picked by angles in thecolor wheel, or heel rotation, as you would put it. So yes,that's roughly the process.
[00:02:43.720]Q: One area I see emacs able to do themes that is "underused?" is changing the font
OK, great. I think the second question is still in theprocess. Oh, well, maybe you could start fielding it. Ithink you've got already something to work on. I see one areaI see Emacs able to do. under use is changing the font, fontsize, font type, model space based on various faces. Yeah,so to paraphrase the question, one thing that Emacs isdefinitely not doing a whole lot of right now is changing thefont that is being used, be it the font size, the font family.Sometimes you see themes, especially old mode themes,fontify differently the headers of the documents versusthe content, and usually you do have a little bit of acontrast that is being introduced. But is it something thatyou find value in, this type of contrast based on font? And tome, it's my personal preference to just use one font. I don'teven change the font size a lot in org mode. It's justpersonal preference.I've seen scenes where once I applied, I opened the org docand suddenly all the titles are like Serif or some fancyfonts. That works. And to me, again, it's a personalpreference that I don't really like that, but I know a lot ofpeople like that. So it's up to you, I guess. Yeah, I mean,this, as we've seen in your talk and as well as the previousone we had this morning, you know, themes are very personaland at the end, whatever you need to, you know, some peopleare going to need more contrast than others, some people aregoing to need a little more variety in the fonts that theyuse. Ultimately, it's up to you really what you want to use.The end point, the angle that one should be aiming for is tofeel comfortable in what they're editing. And whether thiscomfort translates into a very barebone color theme likethe one we saw this morning with very slight colors but stillwhich has a lot of personality or perhaps something closerto yours which tends to use equal luminance or lightness forthe different entries. Well, everyone needs to tune in andfind whatever works best for them, I think. Yep. And also, Iwant to note, I actually have a personal rule. It's also inall my themes. It's that comments have to be italic. I justlike the look of italic comments. So, I actually... So, ifyou... In one of the section in the video, I mentioned I havehooks. Maybe I didn't mention, but I have hooks when usingthe picking the random theme setup. One of the purpose ofthat hook is I can add italic to all the themes on the commentface. Which I don't think it works actually right now, butthat's the intention. Yeah, but I think it answers thequestion we started on originally. Because changing thefont, I mean, using the italic variant of the font, it'sliterally a different font. And so, being able to have thistype of contrast is actually important for you. So, it'snice that you managed to find this particular bit ofknowledge through experimentation. And also I want to addthat if you pick a monospace font like I do, usually there'snot a lot of... Creativity? No, that's not the word. It's alot of personality in the regular font part. But people doput a lot of different things in the italic. So yeah, if youcan find a way to utilize the italic face, you could see someinteresting results. Yeah, definitely. Again, I thinkit's important to consider all the things you can play within terms of contrast. Because at the end of the day, you know,some people are going to be more receptive to a change of fontthan change of color. You know, just considering the amountof people who are colorblind and who are using software likethis. You know, sometimes your vision optimizes forparticular kind of changes and some people are going to bemore sensitive to a slanted eye than they would be to an eyethat is red or an eye that is blue. So, But it's not foreveryone.So I'm looking at the time and we have about eight minutesuntil we go into the next talk.To be frank, I don't think I've got any more questions on myend. I'm not sure if we've got any people on BBB who has joinedus and would like to ask a question. Let me check on IRCquickly if we've got any questions coming our way. I don'tsee any. Do you see any on your end?Not really. Well, then I suggest we just leave it at that andenjoy a little break before the next chat. So, thank you somuch Metrowind for coming to EmacsConf and talking aboutcolors because, as you saw, many people are interestedabout them, so much that another person decided to have achat about theme. We didn't plan for this, but it's nice tosee. And, well, perhaps you could collaborate in the futureand both find the mutual confidence that you need to pushyour stuff to Melpa. Because I did hear that you weren'tfeeling too confident about your random color themepackage. But, you know, you've done the first step, which istalking about it and sharing it with all of us. And perhapsthe next step is to actually clean up the code to yoursatisfaction and publish it eventually. Oh, I can seeanother question. Should we go to that? Sure.
[00:08:53.461]Q: Have you ever kept any of the random themes that were thrown up?
Have you everkept any of the random themes that were thrown up? So I assumethis is for the Monte Carlo setup. The answer is no. Thereason is, like I mentioned, I'm using the randomly pickinga theme setup right now. And Monte Carlo is one of them. Now,when Emacs picks Monte Carlo by chance, I wouldn't knowabout it. So I wouldn't know this is my random theme. That'sthe reason I never kept any, like, good color schemesgenerated. So, no. Right, okay. Well, considering we don'thave any further questions, what I suggest now is that we'llleave it at that. So, again, Metrowind, thank you so much.Thank you. And hopefully we'll hear more of your themes inthe future. Cool. Thanks. All right. Bye bye. Bye bye.