Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
davis278 opened this issue Jan 9, 2020 · 0 comments

Comments

@davis278
Copy link

davis278 commented Jan 9, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant