コード例 #1
0
        public void ColorToHex_WithAlpha_ForTranslucentBlack_GetsBlackHexCode()
        {
            var black = Color.FromArgb(50, Color.Black);

            var hex = HexColorConverter.GetHexCode(black, true);

            Assert.AreEqual("32000000", hex);
        }
コード例 #2
0
        public void ColorToHex_WithoutAlpha_ForBlack_GetsBlackHexCode()
        {
            var black = Color.Black;

            var hex = HexColorConverter.GetHexCode(black, false);

            Assert.AreEqual("000000", hex);
        }