-
Notifications
You must be signed in to change notification settings - Fork 52
compiler:pp -s
and compiler:pp -v dump
should have colors
#55
Comments
let me show an example : This is a custom colorization I made manually in one of my slides. What should be done:
|
Why not using automatic color for the namespace and for tokens? |
@Hywan what do you mean by "automatic color" ? |
@jubianchi Automatic color selection, in a palette. Each token or namespace without a color has a color attached automatically, and it remains attached. This way, this is easy to track the token by its color instead of its name. |
@jubianchi For instance, regarding your example, |
@Hywan good idea! let me try something when I get some time ;) |
Moreover, I would like something like |
I experimented with some algorithms to colorize the output and it seems hard to do it automatically:
If we choose to generate random color on-the-fly, we will have to add too much code (IMHO) to compute random colors, deal with distances between them, etc. If we choose to hardcode a palette, we would have to hardcode two palettes: one for light backgrounds and one for dark ones. Or we have to find a palette working with both backgrounds. |
Can we specify in an other file, which color to join for each token. |
Or shall we think about a "check style" tool? |
@1e1 I don't understand what you're talking about. We are talking about colorizing the output of some @jubianchi Let me ask some colleague designers. Having a pre-defined palette sounds good for me. Else we would have to start a |
@Hywan I randomly generateed 256 colors and manually removed those not fitting in both backgrounds |
@Hywan |
@jubianchi Good work. |
@ghn points me this https://github.com/mbostock/d3/wiki/Ordinal-Scales#categorical-colors. These palettes have not been designed to work on both light and black backgrounds, but we can maybe find some inspiration there. |
How do you choose colors in your palette? Are colors already ordered by distance (in which space?)? Do you choose colors by the maximum distance each time? |
For each new token we shift a color from the palette and use it.
No.
No. |
Sounds good. Colors are a little bit too “agressive”, thoughts? |
@Hywan yes the colors are not optimal :/ |
But this is an excellent start! I am going to ask for a “““palette flatter””” |
@ghn provides me this other resource: http://kentor.me/posts/generating-pastel-colors-for-css/. @jubianchi, it can help you a lot I guess. |
And so this: https://randomcolor.llllll.li/ (a PHP port exists, for inspiration). |
@Hywan I searched yesterday for libraries doing good colors randomization and I found https://randomcolor.llllll.li/ was really promising but to do things well, we should port it. |
@jubianchi Isn't it possible to develop a very minimal algorithm? |
Apply fixes from StyleCI
@jubianchi do you want to post your code in a github repository somewhere? Maybe some people can take it as a starting point and continue your work if you don't longer want it. |
@jubianchi did a good POC with it. It is a great idea. We should do that. Maybe @jubianchi could explain more.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: