osscar-org / widget-bandsplot

A Jupyter widget to plot bandstructure and density of states.
Other
12 stars 4 forks source link

Allow customisation of colors #25

Closed giovannipizzi closed 1 year ago

giovannipizzi commented 2 years ago

Colors should not be hardcoded, even if we change them based on some request, we'll always have someone unhappy. The current ones should be defaults, but there shoudd be ways to change them. Ideally as similar as possible to te way it's done inside the JS code. But for instance, via a dictionary:

{
   "dos": {
      "CoS up": "#123456",
      ...
   },
   "bands": {
       "up": "#123456",
       "down": "#123456",
       "both": "#123456"
   }
}
dou-du commented 2 years ago

Colors should not be hardcoded, even if we change them based on some request, we'll always have someone unhappy. The current ones should be defaults, but there shoudd be ways to change them. Ideally as similar as possible to te way it's done inside the JS code. But for instance, via a dictionary:

{
   "dos": {
      "CoS up": "#123456",
      ...
   },
   "bands": {
       "up": "#123456",
       "down": "#123456",
       "both": "#123456"
   }
}

I think you are referring the colors for the bandstructure. Currently, one can custom the colors for the DOS. We will also add color options for bands data.

dou-du commented 1 year ago

Now, both colors for bandstructure and DOS can be customed from the Json input files.