Ejemplo n.º 1
0
        /// <summary>
        /// Subtracts the darker of the two constituent colors from the lighter color.
        /// Painting with white inverts the backdrop color; painting with black produces no change.
        /// </summary>
        /// <param name="backdrop">The backdrop color.</param>
        /// <param name="source">The source color.</param>
        /// <returns>
        /// The <see cref="Color"/>.
        /// </returns>
        public static Color Difference(Color backdrop, Color source)
        {
            Vector4 difference = Vector4BlendTransforms.Difference(backdrop.ToVector4(), source.ToVector4());

            return(new Color(Pack(ref difference)));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Subtracts the darker of the two constituent colors from the lighter color.
        /// Painting with white inverts the backdrop color; painting with black produces no change.
        /// </summary>
        /// <param name="backdrop">The backdrop color.</param>
        /// <param name="source">The source color.</param>
        /// <returns>
        /// The <see cref="ColorVector"/>.
        /// </returns>
        public static ColorVector Difference(ColorVector backdrop, ColorVector source)
        {
            Vector4 difference = Vector4BlendTransforms.Difference(backdrop.backingVector, source.backingVector);

            return(new ColorVector(difference));
        }