mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-15 02:04:02 +00:00
3e9bb4fb08
The rgba() syntax is supported for a very, very long time now: https://caniuse.com/#feat=mdn-css_types_color_alpha Notes: I realized the numbers in these file names are actually their transparency in percent (more precisely their opaqueness). 4 is 4% which translates to 0.04 in the rgba() syntax. I used Gimp to pick the opaque color values from the images. Gimp makes this easy. No guesswork or calculations needed. For multiple, stacked images I calculated the colors by averaging their RGB values (considering how opaque each color is). Note this is actually *more* precise than the stacked images before. Stacking alpha colors is flawed. For example: Let's say we have an rgba(255, 255, 255, 1) background. Layering a half transparent rgba(255, 0, 0, 0.5) on top means half the background shines through. This averages to rgba( 255, 127, 127, 1). Now we stack rgba(0, 0, 0, 0.5) on top. Again, half the background shines through, resulting in rgba(127, 63, 63, 1). When we apply the two colors the other way around, the result is rgba(191, 63, 63, 1), a much brighter red. This flaw doesn't happen when precalculating the averages, as done in this patch. Change-Id: I29026864714c5f90c2613af57f08693e7e2b996c |
||
---|---|---|
.. | ||
lib | ||
mode/mediawiki | ||
modules/ve-cm | ||
ext.CodeMirror.js | ||
ext.CodeMirror.less |