Beispiel #1
0
        public void HSLPropertiesTest()
        {
            NotifyColor nfcol = new NotifyColor(43, 241, 28);

            Assert.AreEqual(116, nfcol.Hue);
            Assert.AreEqual(88, nfcol.SatHSL);
            Assert.AreEqual(53, nfcol.Light);
        }
Beispiel #2
0
        public void HSBPropertiesTest()
        {
            NotifyColor nfcol = new NotifyColor(231, 32, 78);

            Assert.AreEqual(346, nfcol.Hue);
            Assert.AreEqual(86, nfcol.SatHSB);
            Assert.AreEqual(91, nfcol.Bright);
        }
Beispiel #3
0
        public void SetFromHSBTest()
        {
            NotifyColor nfcol = new NotifyColor(0, 0, 0);

            nfcol.SetFromHSB(312, 0.67, 0.43);
            Assert.AreEqual(110, nfcol.Red);
            Assert.AreEqual(36, nfcol.Green);
            Assert.AreEqual(95, nfcol.Blue);
        }
Beispiel #4
0
        public void SetFromHSLTest()
        {
            NotifyColor nfcol = new NotifyColor(0, 0, 0);

            nfcol.SetFromHSL(37, 0.95, 0.42);
            Assert.AreEqual(209, nfcol.Red);
            Assert.AreEqual(131, nfcol.Green);
            Assert.AreEqual(5, nfcol.Blue);
        }
Beispiel #5
0
        public void SetFromHexTest()
        {
            NotifyColor nfcol = new NotifyColor(0, 0, 0);

            nfcol.SetFromHex("#174CBB");
            Assert.AreEqual(23, nfcol.Red);
            Assert.AreEqual(76, nfcol.Green);
            Assert.AreEqual(187, nfcol.Blue);
        }
Beispiel #6
0
        public void SetFromCMYKTest()
        {
            NotifyColor nfcol = new NotifyColor(0, 0, 0);

            nfcol.SetFromCMYK(0.69, 0.26, 0.52, 0.18);
            Assert.AreEqual(65, nfcol.Red);
            Assert.AreEqual(155, nfcol.Green);
            Assert.AreEqual(100, nfcol.Blue);
        }