You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: css3-images/Overview.src.html
+3-7Lines changed: 3 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -774,15 +774,11 @@ <h3 id='color-stop-syntax'>
774
774
one can convert this to a premultiplied representation by multiplying the
775
775
red, green, and blue components by the alpha component. For example, a
776
776
partially-transparent blue may be given as rgba(0,0,255,.5), which would
777
-
then be expressed as (0,0,127.5,.5) in its premultiplied representation.
778
-
Note that fully opaque colors have the same representation in rgba and
779
-
premultiplied-rgba (you multiply the components by 1), and all fully
780
-
transparent colors are expressed the same way in the premultiplied
781
-
representation (you multiply each component by 0, so no matter what the
782
-
source color was in rgba, the premultiplied representation is (0,0,0,0)).
777
+
then be expressed as [0, 0, 127.5, .5] in its premultiplied representation.
783
778
Interpolating colors using the premultiplied representations rather than
784
779
the plain rgba representations tends to produce more attractive transitions,
785
-
particularly when transitioning from a fully opaque color to fully transparent.</p>
780
+
particularly when transitioning from a fully opaque color to fully transparent.
781
+
Note that transitions where either the transparency or the color are held constant (for example, transitioning between rgba(255,0,0,100%) and rgba(0,0,255,100%) or rgba(255,0,0,100%) and rgba(255,0,0,0%)) have identical results whether the color interpolation is done in premultiplied or non-premultiplied color-space. Differences only arise when both the color and transparency differ between the two endpoints.</p>
0 commit comments