Esempio n. 1
0
        /// <summary>
        /// Converts a <see cref="CieLuv"/> into a <see cref="CieXyz"/>
        /// </summary>
        /// <param name="color">The color to convert.</param>
        /// <returns>The <see cref="CieXyz"/></returns>
        public CieXyz ToCieXyz(CieLchuv color)
        {
            // Conversion to Luv
            CieLuv luvColor = CieLchuvToCieLuvConverter.Convert(color);

            // Conversion to XYZ (incl. adaptation)
            return(this.ToCieXyz(luvColor));
        }
        /// <summary>
        /// Converts a <see cref="CieLchuv"/> into a <see cref="CieLuv"/>
        /// </summary>
        /// <param name="color">The color to convert.</param>
        /// <returns>The <see cref="CieLab"/></returns>
        public CieLuv ToCieLuv(CieLchuv color)
        {
            // Conversion (perserving white point)
            CieLuv unadapted = CieLchuvToCieLuvConverter.Convert(color);

            if (!this.IsChromaticAdaptationPerformed)
            {
                return(unadapted);
            }

            // Adaptation
            return(this.Adapt(unadapted));
        }