Exemplo n.º 1
0
        /// <summary>
        ///     Convert the color to the RGB format.
        /// </summary>
        /// <returns>
        ///     The color in a RGB format.
        /// </returns>
        public Rgb ToRgb()
        {
            ushort red = ushort.Parse(this.htmlColor.Substring(1, 2), NumberStyles.AllowHexSpecifier);
            ushort green = ushort.Parse(this.htmlColor.Substring(3, 2), NumberStyles.AllowHexSpecifier);
            ushort blue = ushort.Parse(this.htmlColor.Substring(5, 2), NumberStyles.AllowHexSpecifier);

            Rgb rgb = new Rgb(red, green, blue);

            return rgb;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Blink1Preset"/> class.
        /// </summary>
        /// <param name="millisecond">
        /// The number of milliseconds the fading will last.
        /// </param>
        /// <param name="rgb">
        /// The RGB color.
        /// </param>
        public Blink1Preset(ushort millisecond, Rgb rgb)
        {
            this.Millisecond = millisecond;

            this.Rgb = rgb;
        }