Example #1
0
        public void ShouldReturnNameWhenConvertedToString()
        {
            NamedColor color = new NamedColor("name", Colors.AliceBlue);

            Assert.AreEqual <string>("name", color.ToString());
        }
Example #2
0
 /// <summary>
 /// Sets the background color of the element to the given colour.
 /// </summary>
 public IComponentFeatures Background(NamedColor color)
 {
     this.AddPendingClass($"bg-{color.ToString().Hyphenate().ToLower()}");
     return(this);
 }
Example #3
0
 /// <summary>
 /// Sets the text colour to the given colour.
 /// </summary>
 public IComponentFeatures Text(NamedColor color)
 {
     this.AddPendingClass($"text-{color.ToString().Hyphenate().ToLower()}");
     return(this);
 }
Example #4
0
 public Color(NamedColor color)
     : this(color.ToString(format : "G"))
 {
 }