Ejemplo n.º 1
0
        public void ShouldReturnNameWhenConvertedToString()
        {
            NamedColor color = new NamedColor("name", Colors.AliceBlue);

            Assert.AreEqual <string>("name", color.ToString());
        }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 4
0
 public Color(NamedColor color)
     : this(color.ToString(format : "G"))
 {
 }