Пример #1
0
        /// <summary>
        /// Selects the darker of the backdrop and source colors.
        /// The backdrop is replaced with the source where the source is darker; otherwise, it is left unchanged.
        /// </summary>
        /// <param name="backdrop">The backdrop color.</param>
        /// <param name="source">The source color.</param>
        /// <returns>
        /// The <see cref="Color"/>.
        /// </returns>
        public static Color Darken(Color backdrop, Color source)
        {
            Vector4 darken = Vector4BlendTransforms.Darken(backdrop.ToVector4(), source.ToVector4());

            return(new Color(Pack(ref darken)));
        }
Пример #2
0
        /// <summary>
        /// Selects the darker of the backdrop and source colors.
        /// The backdrop is replaced with the source where the source is darker; otherwise, it is left unchanged.
        /// </summary>
        /// <param name="backdrop">The backdrop color.</param>
        /// <param name="source">The source color.</param>
        /// <returns>
        /// The <see cref="ColorVector"/>.
        /// </returns>
        public static ColorVector Darken(ColorVector backdrop, ColorVector source)
        {
            Vector4 darken = Vector4BlendTransforms.Darken(backdrop.backingVector, source.backingVector);

            return(new ColorVector(darken));
        }