Applying percentage values to named color variables #1415
-
I've been working on updating my theme to the new system. First off I do want to say that the recent changes to theming and configuration files are absolutely fantastic! Everything feels more logical, organized, and readable than ever before. So huge thanks to everyone who worked on putting all of that together. With that said, I am struggling to understand how to actually apply a percentage value to a named color variable. Specifically in regards to transparency. I've primarily been referencing this section of the Whenever I include a percentage (either 50% or 0.5) I am greeted with an error that Rofi was expecting the line-escape character What would a properly formatted percentage exactly look like? And, if applicable, are there any hierarchy limitations that should be factored in (I.E. Can only be applied within global configuration, or within the Window element, etc.)? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Thanks for liking the changes. I really hoped this system would improve things when I introduced it in 2017 :D. Its been a few years I wrote this color stuff, let me look back. For named colors: window {
background-color: black / 50%;
} This makes the window background black with 50% opacity. The other formats, it is an extra optional field: window {
background-color: rgb(244,244,244, 50%);
} or window {
background-color: hsl(1,0.4,0.3, 0.5); }
} |
Beta Was this translation helpful? Give feedback.
Thanks for liking the changes. I really hoped this system would improve things when I introduced it in 2017 :D.
Its been a few years I wrote this color stuff, let me look back.
For named colors:
This makes the window background black with 50% opacity.
The other formats, it is an extra optional field:
or