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
  • Linear
  • Options
  • Greyscale
  • Options
  • Gold
  • Channels
  • Options

Was this helpful?

  1. Rendering

Color Interpolators

PreviousSliceAndDiceTreeRendererNextTree Rendering

Last updated 3 years ago

Was this helpful?

Linear

The LinearColorInterpolator is a generalised linear interpolator where you specify the two colours to interpolate between.

Options

Property

Type

Description

Start

Color

Color if value is 0

End

Color

Color if value is 1

Greyscale

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

public class GreyscaleInterpolator : LinearColorInterpolator, IColorInterpolator

Options

Property

Type

Description

Reverse

bool

If true, starts from white instead of black

Gold

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

Channels

Channel

Formula

Graph

Red

Green

Blue

Options

None

255x+127(1−2∣12−x∣)255x + 127(1 - 2|\frac{1}{2} - x|)255x+127(1−2∣21​−x∣)
127(1−2∣12−x∣)127(1 - 2|\frac{1}{2} - x|)127(1−2∣21​−x∣)
255(1−x)−127(1−2∣12−x∣)255(1 - x) - 127(1 - 2|\frac{1}{2}-x|)255(1−x)−127(1−2∣21​−x∣)