a gradient thing that should go into the library instead of being relegated to the examples directory