Faze
v2.0.0-pre
v2.0.0-pre
  • Introduction
  • Getting Started
  • Abstractions
    • IPipeline
    • IGameState
    • IPlayer
    • Rendering
      • ITreePainter
      • IPaintedTreeRenderer
      • IColorInterpolator
  • Engine
    • Agents
  • Rendering
    • Tree Renderers
      • SquareTreeRenderer
      • SliceAndDiceTreeRenderer
    • Color Interpolators
  • Concept
    • Tree Rendering
    • Real-time Rendering
  • Blog
    • Visualising games as fractals
    • Visualising player choice
  • Examples
    • 8 Queens Problem
    • Chess Pieces
    • Gallery
  • Research
    • Renderers
      • Square Tree Renderer
      • Circle Edge Renderer
      • Compressed Square Tree Renderer
  • GitHub Repository
Powered by GitBook
On this page
  • Examples
  • Greyscale
  • Linear
  • Gold

Was this helpful?

  1. Abstractions
  2. Rendering

IColorInterpolator

PreviousIPaintedTreeRendererNextEngine

Last updated 3 years ago

Was this helpful?

Colour interpolators implement the IColorInterpolator interface

    public interface IColorInterpolator
    {
        Color GetColor(double d);
    }

Given a number between 0 - 1, colour interpolators will map it to a colour.

Examples

For more examples, and the complete list of available colour interpolators, see

Greyscale

The GreyscaleColorInterpolator is a common linear interpolator from Black -> While

DrawGreyscale

Linear

A generalised linear interpolator where you specify the two colours to interpolate between.

Gold

A custom interpolator which emphasises the mid-range, going from Blue -> Yellow -> Red

DrawLinearBlueRed
DrawGold
Rendering.ColorInterpolators