跳至主要内容

Color Adjust Filter Component

Component Screenshot

Overview

This component applies a filter to the Unity UI component to allow colors to be adjusted.

WebGL Demo

WebGL demo of this component

Properties

Component Screenshot

Property                            Type    Range    DefaultDescription
Adjust
    HueFloat[0..360]0.0The amount to adjust hue by.
    SaturationFloat[-1..1]0.0The amount to adjust saturation by.
    ValueFloat[-1..1]0.0The amount to adjust value by. This is similar to adjusting brightness but usally looks more natural.
    ContrastFloat[-2..2]0.0The amount to adjust constrast by.
-1.0 will cause all contrast to be lost.
-2.0 will cause cause the brightness to invert.
    BrightnessFloat[-1..1]0.0The amount to adjust brightness by.
    PosterizeFloat[0..255]255.0The amount of colors to reduce to. This creates a poster/cartoon effect by reducing the number of colors.
    OpacityFloat[0..1]1.0The amount of opacity. 0 is fully transparent, 1 is fully opaque.
Advanced
    Brightness RGBAFloat[-1..1]0.0The amount to adjust brightness by in each individual channel.
    Contrast RGBAFloat[-2..2]0.0The amount to adjust constrast by in each individual channel.
    Posterize RGBAFloat[0..255]255.0The amount of colors to reduce to in each individual channel. This creates a poster/cartoon effect by reducing the number of colors.
Apply
    StrengthFloat[0..1]1.0Strength of the effect.

Usage

Add this component to any GameObject that contains a UI Graphic component (eg Text, Image, RawImage, etc).

Usage with TextMeshPro

To use this filter effect with TextMeshPro use the Filter Stack (TextMeshPro) component.