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

Add more built-in colors #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

zjijz
Copy link

@zjijz zjijz commented Jan 23, 2023

eThis adds all named HTML colors to be supported by MarkWhen tags. In the event of a collision, the MarkWhen selected value will be used instead of the HTML value. The previously declared COLORS array has been renamed to MARKWHEN_COLORS and is used in the other same places, mainly to cycle through fallabck colors if a user-specified color is wrong.

This also adds a new tag color syntax: html(<name>). This can be used to force selection of the HTML-variant of the color name instead of the MarkWhen-variant.

This adds all named HTML colors to be supported by MarkWhen tags. In the event of a collision, the MarkWhen selected value will be used instead of the HTML value. The previously declared `COLORS` array has been renamed to `MARKWHEN_COLORS` and is used in the other same places, mainly to cycle through fallabck colors if a user-specified color is wrong.

This also adds a new tag color syntax: `html(<name>)`. This can be used to force selection of the HTML-variant of the color name instead of the MarkWhen-variant.
@zjijz
Copy link
Author

zjijz commented Jan 23, 2023

@kochrt Let me know how I can test this to verify it doesn't break existing features and also works as intended for the new stuff.

@kochrt
Copy link
Member

kochrt commented Jan 25, 2023

First of all, thanks for doing all this!

My initial thoughts are that I'm not particularly attached to the default colors that exist now (HUMAN_COLORS), but I'm also not really attached to html default colors either. I don't see that many people reaching for moccasin or rebeccapurple, ya know?

What if we just extended (or replaced) HUMAN_COLORS to have some more variety with some easier names, like red1, red2, ... red10, gray1 ... gray10, etc., increasing in darkness? I tend to instinctively reach for tailwind but I'm sure there are other palette examples out there.

If we did something like that we could avoid the additional html(...) syntax.

What do you think?

@kochrt
Copy link
Member

kochrt commented Jan 31, 2023

https://yeun.github.io/open-color/ just found this while rummaging around excalidraw stuff

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

Successfully merging this pull request may close these issues.

2 participants