Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    ColorExtensions Class

    Namespace: Stride.Core.Mathematics
    Assembly: Stride.Core.Mathematics.dll

    A class containing extension methods for processing colors.

    System.Object → ColorExtensions
    Derived from ColorExtensions:

    public static class ColorExtensions
    Name Description
    Methods
    CanConvertStringToRgba(String)

    Indicates if the given string can be converted to an System.UInt32 RGBA value using StringToRgba(String).

    RgbaToString(Int32)

    Converts the given RGBA value to a string.

    RgbToString(Int32)

    Converts the given RGB value to a string.

    StringToRgba(String)

    Converts the given string to an System.UInt32 RGBA value.

    | Improve this Doc View Source

    Methods


    CanConvertStringToRgba(String)

    Indicates if the given string can be converted to an System.UInt32 RGBA value using StringToRgba(String).

    public static bool CanConvertStringToRgba(string stringColor)
    Parameters
    Type Name Description
    System.String stringColor

    The string to convert.

    Returns
    Type Description
    System.Boolean

    True if the string can be converted, false otherwise.


    RgbaToString(Int32)

    Converts the given RGBA value to a string.

    public static string RgbaToString(int value)
    Parameters
    Type Name Description
    System.Int32 value

    The RGBA value to convert.

    Returns
    Type Description
    System.String

    The converted string.


    RgbToString(Int32)

    Converts the given RGB value to a string.

    public static string RgbToString(int value)
    Parameters
    Type Name Description
    System.Int32 value

    The RGB value to convert.

    Returns
    Type Description
    System.String

    The converted string.


    StringToRgba(String)

    Converts the given string to an System.UInt32 RGBA value.

    public static uint StringToRgba(string stringColor)
    Parameters
    Type Name Description
    System.String stringColor

    The string to convert.

    Returns
    Type Description
    System.UInt32

    The converted RGBA value.


    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation