docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ColorUtils

    A set of color manipulation utilities.

    Inheritance
    object
    ColorUtils
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Rendering
    Assembly: Unity.RenderPipelines.Core.Runtime.dll
    Syntax
    public static class ColorUtils

    Fields

    Name Description
    s_LensAttenuation

    Factor used for our lens system w.r.t. exposure calculation. Modifying this will lead to a change on how linear exposure multipliers are computed from EV100 values (and viceversa). s_LensAttenuation models transmission attenuation and lens vignetting. Note that according to the standard ISO 12232, a lens saturates at s_LensAttenuation = 0.78f (under ISO 100).

    s_LightMeterCalibrationConstant

    Calibration constant (K) used for our virtual reflected light meter. Modifying this will lead to a change on how average scene luminance gets mapped to exposure.

    Properties

    Name Description
    lensImperfectionExposureScale

    Scale applied to exposure caused by lens imperfection. It is computed from s_LensAttenuation as follow: (78 / ( S * q )) where S = 100 and q = s_LensAttenuation

    Methods

    Name Description
    CIExyToLMS(float, float)

    CIE xy chromaticity to CAT02 LMS. http://en.wikipedia.org/wiki/LMS_color_space#CAT02

    ColorBalanceToLMSCoeffs(float, float)

    Converts white balancing parameter to LMS coefficients.

    ComputeEV100(float, float, float)

    Computes an exposure value (EV100) from physical camera settings.

    ComputeEV100FromAvgLuminance(float)

    Computes an exposure value (EV100) from an average luminance value.

    ComputeISO(float, float, float)

    Computes the required ISO to reach targetEV100.

    ConvertEV100ToExposure(float)

    Converts an exposure value (EV100) to a linear multiplier.

    ConvertExposureToEV100(float)

    Converts a linear multiplier to an exposure value (EV100).

    Luminance(in Color)

    Returns the luminance of the specified color. The input is considered to be in linear space with sRGB primaries and a D65 white point.

    PrepareLiftGammaGain(in Vector4, in Vector4, in Vector4)

    Pre-filters lift, gamma and gain trackball values for shader use.

    PrepareShadowsMidtonesHighlights(in Vector4, in Vector4, in Vector4)

    Pre-filters shadows, midtones and highlights trackball values for shader use.

    PrepareSplitToning(in Vector4, in Vector4, float)

    Pre-filters colors used for the split toning effect.

    StandardIlluminantY(float)

    An analytical model of chromaticity of the standard illuminant, by Judd et al. http://en.wikipedia.org/wiki/Standard_illuminant#Illuminant_series_D Slightly modifed to adjust it with the D65 white point (x=0.31271, y=0.32902).

    ToHex(Color)

    Converts a color value to its 32-bit hexadecimal representation.

    ToRGBA(uint)

    Converts a 32-bit hexadecimal value to a color value.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)