Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom colours? #14

Closed
tetsujin1979 opened this issue Jul 15, 2022 · 1 comment
Closed

Custom colours? #14

tetsujin1979 opened this issue Jul 15, 2022 · 1 comment

Comments

@tetsujin1979
Copy link

How can the colours of the glyphs and background be customised?
I've tried changing the backgroundColor value on line 56 of config.js -

backgroundColor: [0, 0, 0], // The color "behind" the glyphs
- to 9, 9, 9 for a white background, but this changes the font colour to white so I can't see anything!
What else needs to be changed for the glyph colour?

@Rezmason
Copy link
Owner

Rezmason commented Aug 24, 2022

Sorry for the late reply!

Check out the paletteEntries field on the "palimpsest" version:

matrix/js/config.js

Lines 200 to 203 in a4a0406

paletteEntries: [
{ hsl: [0.15, 0.25, 0.9], at: 0.0 },
{ hsl: [0.6, 0.8, 0.1], at: 0.4 },
],

See how the "lowest" color is brighter than the "highest" color?

You can imagine that the values in paletteEntries are like values in a Photoshop gradient— they have a color, and a number between zero and one that represents where they fall along the spectrum.

image

So, for instance, if you want a white background with amber glyphs that turn aquamarine, you could try:

tetsujin1979: {
	bloomStrength: 0,
	paletteEntries: [
		{ hsl: [0, 1, 1], at: 0.0 },      // red saturated white
		{ hsl: [0.15, 1, 0.4], at: 0.8 }, // amber saturated slightly dark
		{ hsl: [0.5, 1, 0.4], at: 1.0 },  // cyan saturated slightly dark
	],
},

Result:

image

I know the options are a bit confusing, hopefully soon I'll have the time to improve things one way or another. Thanks for taking an interest in the project!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants