Opened 14 years ago
Closed 13 years ago
#413 closed task (fixed)
configure colors in plot
Reported by: | Peter Johansson | Owned by: | Jari Häkkinen |
---|---|---|---|
Priority: | minor | Milestone: | svndigest 0.8 |
Component: | configuration | Version: | trunk |
Keywords: | Cc: |
Change History (8)
comment:1 follow-up: 3 Changed 13 years ago by
Owner: | changed from Peter Johansson to Jari Häkkinen |
---|---|
Status: | new → assigned |
comment:2 Changed 13 years ago by
Milestone: | svndigest 0.x+ → svndigest 0.8 |
---|
comment:3 follow-up: 4 Changed 13 years ago by
Replying to jari:
I am using the colour selected for blame output also for the plots. Comments?
I think that is the way to go. I think it should be like this:
Color in plot and color in blame is the same. Color is chosen according to scheme in class Colours. Choice can be overridden in config file, section [author-color]. Currently we support any string that the browsers can understand as a color, typically a sex-digit hexadecimal number (aa0000) but I think also the shorter form (a00) is accepted. I think we should also support 137,0,0.
The configuration class need to understand these formats , and I think we should save the to color maps: one with <author, string> and one <author, color> where color is a new struct only containing three unsigned short. In addition to Configuration::author_str_color we should a similar function that returns a const color&. How these should be used in the output should be pretty straightforward.
If you think this sounds good, but would prefer that I implement any sub-task, please open a new ticket with that sub-task.
comment:4 follow-up: 6 Changed 13 years ago by
Replying to peter:
Color in plot and color in blame is the same. Color is chosen according to scheme in class Colours. Choice can be overridden in config file, section [author-color]. Currently we support any string that the browsers can understand as a color, typically a sex-digit hexadecimal number (aa0000) but I think also the shorter form (a00) is accepted. I think we should also support 137,0,0.
I have added code that converts RRGGBB to the format accepted by plplot. The other formats will break the current code. However, when the svndigest repo is open for commits again I'll add support for the other formats.
The configuration class need to understand these formats , and I think we should save the to color maps: one with <author, string> and one <author, color> where color is a new struct only containing three unsigned short. In addition to Configuration::author_str_color we should a similar function that returns a const color&. How these should be used in the output should be pretty straightforward.
I think it is customary to us unsigned char for r,g,b. There is already a colour struct in Colour (which I'll rename to Color soon, we cannot mix color and colour). Also, I am about to commit code that does not fully comply to the above. Check it out and then we discuss how we want it to be.
comment:5 Changed 13 years ago by
comment:6 Changed 13 years ago by
Replying to jari:
Replying to peter: However, when the svndigest repo is open for commits again I'll add support for the other formats.
I'll have a look at ticket:415 and after that I will release 0.7.1 and merge it into trunk.
I think it is customary to us unsigned char for r,g,b.
OK
comment:7 Changed 13 years ago by
comment:8 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I am using the colour selected for blame output also for the plots. Comments?