Two related questions
- Is it possible to use opacity while theming in emacs? I mean defining theme which - for example - would add 25% of blue to the background color of elements it is applied to. Or which would make font 30% lighter.
Or, if not.
- Is it possible to dynamically recalculate some theme properties whenever main custom theme changes?
Background
Such a thing would be great for various „add-some-mark” modes. One case I mean specifically is flycheck-error face, which would be less invasive if it gave background slight red accent instead of underlining text.
But my main case is crosshairs mode (which combines highlighting current row and current column). I configured it to use background slightly different than default, and that created nice subtle indication of cursor location. But once I started switching themes more often, it turned out to be nuisance, as proper color depends on current background.
gamgrid-colorandgamegrid-colorize-glyphwithingamegrid.elis a combined example where shading can be used to create different levels of coloring -- e.g., the shades used 0.6 or 0.8 or 1.0 (full color). The color one desires to change within a theme can be done programmatically by converting the color to a 3-element vector using the functioncolor-name-to-rgbfromcolor.el. The functionface-remap-add-relativecan be used to make a particular face buffer-local: gnu.org/software/emacs/manual/html_node/elisp/…vline-styleof'compose[use composit char] or'mixed[use face and composit char] to create a vertical strike-through effect. The default value is'face. Thevline-styleoptions of'composeand'mixedwork out of the box on Windows, but do not work out of the box on OSX. The vertical strike-through effect with'composedoes not use a face, and that would perhaps resolve your issue with background coloring interfering with seeing the vertical line.