soflyy / oxygen-bugs-and-features

Bug Reports & Feature Requests for Oxygen
https://oxygenbuilder.com/
315 stars 29 forks source link

Allow changing alpha value in css color() function #2540

Open karmaral opened 2 years ago

karmaral commented 2 years ago

Describe the feature you'd like to see included in Oxygen. It would be really handy to have a second parameter to the color(id) function that returns the same color but with the specified alpha: color(id, alpha)

What are the use cases for this feature? Improved efficiency and flexibility on the workflow. Many times I'd want to tweak or apply a color with a diminished or secondary emphasis, not even worth the addition to the color palette. I then have to either go to devtools and use the color picker on the preview, or travel to Manage > Settings > Global Styles > Colors > Global Colors

Both are tedious, and the oxygen route closes the stylesheet editor, which is even less desirable for workflow fluency. This solution would achieve the same result much more quickly.

Examples of this feature or functionality.

******************
Global Colors 
Color 1
  id : 1
  value : rgb(255, 0, 0)
******************

color: color(1); // Prints rgb(255, 0, 0)
background: color(1, 50%); // rgba(255, 0, 0, 50%)
border-color: color(1, .3); // rgba(255, 0, 0, .3)
etc
eliane345 commented 2 years ago

acho que vou desistir me sinto uma...uma sem palavras