Show / Hide Table of Contents

Class ColorExtention

Simple extensions for the Unity Color classs

Inheritance
System.Object
ColorExtention
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: AnimationHelpers
Assembly: cs.temp.dll.dll
Syntax
public static class ColorExtention

Methods

Distance(Color, Color)

Calculates the Manhattan (L1 norm) distance of a color

Declaration
public static float Distance(this Color color, Color otherColor)
Parameters
Type Name Description
Color color

The first color

Color otherColor

The second color

Returns
Type Description
System.Single

The distance between the two colors

SetAlpha(Color, Single)

Creates a new color object based on the given color with a new alpha value.

Declaration
public static Color SetAlpha(this Color color, float value)
Parameters
Type Name Description
Color color

The base color

System.Single value

The alpha value [0, 1]

Returns
Type Description
Color

A modified Color value with the new alpha value

Back to top Generated by DocFX