Open FredericHirschmueller opened 2 years ago
Here, for the bus factor, are the colors for the sankey graph/links between components (linked to energy carrier):
const energyColors = { electricity: 'rgb(255, 215, 0)', gas: 'rgb(250, 135, 117)', hydrogen: 'rgb(234, 95, 148)', heat: 'rgb(205, 52, 181)', fossil: 'rgb(0, 0, 255)' }
const energyColorsOpacity = {
electricity: 'rgba(255, 215, 0, 0.15)',
gas: 'rgba(250, 135, 117, 0.15)',
hydrogen: 'rgba(234, 95, 148, 0.15)',
heat: 'rgba(205, 52, 181, 0.15)',
fossil: 'rgba(0, 0, 255, 0.15)'
}
@bmlancien - I might ask you for color palettes once I categorized the options we would have
@bmlancien - I might ask you for color palettes once I categorized the options we would have
@Bachibouzouk Alright
If we let the user choose the color of each asset (with color palette) in the asset forms we solve this issue (need to add this to the db of Assets model. Then user preferences could be set for each of the existing components under "account" so that one component has always the same color.
One could also use different shades of colors for different instances of the same component type, for this one would need to convert the rgb to hsl and then change the hsl value of the base color : https://docs.python.org/3/library/colorsys.html
If we let the user choose the color of each asset (with color palette) in the asset forms we solve this issue (need to add this to the db of Assets model. Then user preferences could be set for each of the existing components under "account" so that one component has always the same color.
If we want to give this option, we should still use default colors on start with the option for the user to change the colors (but still same palette, otherwise that would get too messy).
One could also use different shades of colors for different instances of the same component type
How many instances can a component have? If it's getting a lot, I don't know if different shades would be enough to differentiate them.
@bmlancien - there can be a lot of instances (no upper limit really), but I would think that 3 shades that repeat in a cycle would already cover a lot of usecases
For a better overview in the result graphs it is usefull to assign similar colours for the same asset types.
For example: The values of the demand assets could be displayed with red lines using different tones. The values of the production assets could be displayed through green lines using different tones. Storage could be blue. Providers could be yellow. Transformers could be black.