-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[IDEA] Ship Palette with Rendered Wikitext to Final Color Codes #8550
Comments
IMO the contrary is true. Using colour variables makes changing colours easy, without the need to change the configuration. Also plugins should use TW colour codes. It should be possible to add an Plugin authors also should use the Hardcoding all values will make palette switching impossible. |
Would you please give an example to demonstrate using color wikitext as color value in palettes is better and simpler? I am trying to create a lighter shade of
Then in place I want to use the above code (stored inside a procedure, I have to use another $wikify. |
Eric made a comment at: #8326 (comment) which points to a Talk discussion: https://talk.tiddlywiki.org/t/how-to-use-the-colour-macro-as-an-attribute-value/10051 This may be an option for plugin authors to add an alpha value to existing core values. Erics code:
A
Be aware, that myColour can only handle hex-values or |
Thank you! but this is complex as you see! |
IMO not more than everything else. You need to create the macro once and then you can use is. The complexity is hidden away. That's true for most of the TW stuff. The main advantage of our colour-macro and also of CSS variables is, that the assignments in the CSS code can stay the same. Only the variable definitions need to change to switch to a different palette. I think it would be nice if our core colour-macro could allow us to assign an alpha value, if we need it. But I'm not sure if we can change the colour macro in a backwards compatible way. -- @ericshulman -- Did you ever run experiments with an alpha value added to the But would it be possible to add an alpha value there? |
CSS colors that include an alpha value need to be specified using 8-digit hex: However, color palette values permit:
Thus, simply appending an alpha value to a colour macro result is not sufficient. All of the above would need to be converted to |
Thank you all! |
Is your feature request related to a problem? Please describe.
The palette uses wikitext to set color of some elements. This makes it difficult to reuse those wikitext. Instead having color codes, makes life for plugin developer much easier. For example, there are simple tools (wikitext and JS) to get a color code and generate different shades of it, or apply the alpha channel and opacity etc.
Describe the solution you'd like
To keep the backward compatibility, when ship palettes with TiddlyWiki, use the rendered palette i.e. the compiled color to their final values. It seems the old TiddlyWiki uses hex codes. The original palette can be kept with core code.
The text was updated successfully, but these errors were encountered: