1. Technology
Send to a Friend via Email
You can opt-out at any time. Please refer to our privacy policy for contact information.

Add a Little Color to Your Shoes


2 of 4

Color Gradients
Add a Little Color to Your Shoes

When using the HTML-like RGB hex values, you can represent a range of colors by using the range literal. This range of colors can be used as a gradient for the background of any container. The gradient will smoothly (and vertically) fade from one color to the next.

Shoes.app :width => 300, :height => 150 do
  background '#ffa500'..'#aaa'
  stack do
    title "Colors!",
      :stroke => darkred
    title "More colors!",
      :stroke => '#efb'
  1. About.com
  2. Technology
  3. Ruby
  4. Graphical User Interfaces
  5. Shoes
  6. Color Gradients

©2014 About.com. All rights reserved.