vcs icon indicating copy to clipboard operation
vcs copied to clipboard

Alpha channel for color of Text Objects does not work; RGB values non-standard

Open davis278 opened this issue 4 years ago • 0 comments

Though the documentation and the VCS Text Objects notebook (https://github.com/CDAT/Jupyter-notebooks/tree/master/vcs/VCS_Text_Objects or https://cdat.llnl.gov/Jupyter-notebooks/vcs/VCS_Text_Objects/VCS_Text_Objects.html) state that a color can be specified with RGB[a] values, the alpha channel [a] does not work and the RGB "values" are non-standard - they appear to be percentages between 0 and 100 rather than the more common numeric value between 0 and 255.

For the Alpha channel: I tried the following code as an old text objects notebook suggests (https://github.com/CDAT/vcs/blob/master/docs/Jupyter/Text_Objects.ipynb), but could not get the alpha channel to work.

import vcs txt = vcs.createtext() txt.string = 'A VCS Text Object' txt.color = (100,0,0,25) canvas.plot(txt)

I tried the following but none of them worked: txt.color = (100,0,0,0.25) txt.color = (100,0,0,.25) txt.color = [100,0,0,25]

For the RGB portion of the issue, I tried: txt.color = (255,0,0,25) but this leads to an error that says that values cannot exceed 100.

davis278 avatar Jan 09 '20 20:01 davis278