Exemplo n.º 1
0
        /// <summary>
        /// Multiplies or screens the colors, depending on the backdrop color value.
        /// <remarks>
        /// Source colors overlay the backdrop while preserving its highlights and shadows.
        /// The backdrop color is not replaced but is mixed with the source color to reflect the lightness or darkness
        /// of the backdrop.
        /// </remarks>
        /// </summary>
        /// <param name="backdrop">The backdrop color.</param>
        /// <param name="source">The source color.</param>
        /// <returns>
        /// The <see cref="Color"/>.
        /// </returns>
        public static Color Overlay(Color backdrop, Color source)
        {
            Vector4 overlay = Vector4BlendTransforms.Overlay(backdrop.ToVector4(), source.ToVector4());

            return(new Color(Pack(ref overlay)));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Multiplies or screens the colors, depending on the backdrop color value.
        /// <remarks>
        /// Source colors overlay the backdrop while preserving its highlights and shadows.
        /// The backdrop color is not replaced but is mixed with the source color to reflect the lightness or darkness
        /// of the backdrop.
        /// </remarks>
        /// </summary>
        /// <param name="backdrop">The backdrop color.</param>
        /// <param name="source">The source color.</param>
        /// <returns>
        /// The <see cref="ColorVector"/>.
        /// </returns>
        public static ColorVector Overlay(ColorVector backdrop, ColorVector source)
        {
            Vector4 overlay = Vector4BlendTransforms.Overlay(backdrop.backingVector, source.backingVector);

            return(new ColorVector(overlay));
        }