menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ColorUtil - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ColorUtil

    Summary description for ColorConvert.

    Inheritance
    System.Object
    ColorUtil
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.HTMLUI.Base.Utility
    Assembly: Syncfusion.HTMLUI.Base.dll
    Syntax
    public sealed class ColorUtil

    Properties

    VSNetBackgroundBrush

    Gets the VS net background brush.

    Declaration
    public static Brush VSNetBackgroundBrush { get; }
    Property Value
    Type Description
    System.Drawing.Brush

    The VS net background brush.

    VSNetBackgroundColor

    Gets the color of the VS net background.

    Declaration
    public static Color VSNetBackgroundColor { get; }
    Property Value
    Type Description
    System.Drawing.Color

    The color of the VS net background.

    VSNetBackgroundPen

    Gets the VS net background pen.

    Declaration
    public static Pen VSNetBackgroundPen { get; }
    Property Value
    Type Description
    System.Drawing.Pen

    The VS net background pen.

    VSNetBorderBrush

    Gets the VS net border brush.

    Declaration
    public static Brush VSNetBorderBrush { get; }
    Property Value
    Type Description
    System.Drawing.Brush

    The VS net border brush.

    VSNetBorderColor

    Gets the color of the VS net border.

    Declaration
    public static Color VSNetBorderColor { get; }
    Property Value
    Type Description
    System.Drawing.Color

    The color of the VS net border.

    VSNetBorderPen

    Gets the VS net border pen.

    Declaration
    public static Pen VSNetBorderPen { get; }
    Property Value
    Type Description
    System.Drawing.Pen

    The VS net border pen.

    VSNetCheckedBrush

    Gets the VS net checked brush.

    Declaration
    public static Brush VSNetCheckedBrush { get; }
    Property Value
    Type Description
    System.Drawing.Brush

    The VS net checked brush.

    VSNetCheckedColor

    Gets the color of the VS net checked.

    Declaration
    public static Color VSNetCheckedColor { get; }
    Property Value
    Type Description
    System.Drawing.Color

    The color of the VS net checked.

    VSNetCheckedPen

    Gets the VS net checked pen.

    Declaration
    public static Pen VSNetCheckedPen { get; }
    Property Value
    Type Description
    System.Drawing.Pen

    The VS net checked pen.

    VSNetContrast1

    Gets the VS net contrast1.

    Declaration
    public static Brush VSNetContrast1 { get; }
    Property Value
    Type Description
    System.Drawing.Brush

    The VS net contrast1.

    VSNetContrast2

    Gets the VS net contrast2.

    Declaration
    public static Brush VSNetContrast2 { get; }
    Property Value
    Type Description
    System.Drawing.Brush

    The VS net contrast2.

    VSNetContrast3

    Gets the VS net contrast3.

    Declaration
    public static Brush VSNetContrast3 { get; }
    Property Value
    Type Description
    System.Drawing.Brush

    The VS net contrast3.

    VSNetControlBrush

    Gets the VS net control brush.

    Declaration
    public static Brush VSNetControlBrush { get; }
    Property Value
    Type Description
    System.Drawing.Brush

    The VS net control brush.

    VSNetControlColor

    Gets the color of the VS net control.

    Declaration
    public static Color VSNetControlColor { get; }
    Property Value
    Type Description
    System.Drawing.Color

    The color of the VS net control.

    VSNetControlPen

    Gets the VS net control pen.

    Declaration
    public static Pen VSNetControlPen { get; }
    Property Value
    Type Description
    System.Drawing.Pen

    The VS net control pen.

    VSNetPressedBrush

    Gets the VS net pressed brush.

    Declaration
    public static Brush VSNetPressedBrush { get; }
    Property Value
    Type Description
    System.Drawing.Brush

    The VS net pressed brush.

    VSNetPressedColor

    Gets the color of the VS net pressed.

    Declaration
    public static Color VSNetPressedColor { get; }
    Property Value
    Type Description
    System.Drawing.Color

    The color of the VS net pressed.

    VSNetPressedPen

    Gets the VS net pressed pen.

    Declaration
    public static Pen VSNetPressedPen { get; }
    Property Value
    Type Description
    System.Drawing.Pen

    The VS net pressed pen.

    VSNetSelectionBrush

    Gets the VS net selection brush.

    Declaration
    public static Brush VSNetSelectionBrush { get; }
    Property Value
    Type Description
    System.Drawing.Brush

    The VS net selection brush.

    VSNetSelectionColor

    Gets the color of the VS net selection.

    Declaration
    public static Color VSNetSelectionColor { get; }
    Property Value
    Type Description
    System.Drawing.Color

    The color of the VS net selection.

    VSNetSelectionPen

    Gets the VS net selection pen.

    Declaration
    public static Pen VSNetSelectionPen { get; }
    Property Value
    Type Description
    System.Drawing.Pen

    The VS net selection pen.

    Methods

    ColorFromRGBString(String)

    Colors from RGB string.

    Declaration
    public static Color ColorFromRGBString(string text)
    Parameters
    Type Name Description
    System.String text

    The text.

    Returns
    Type
    System.Drawing.Color

    GetBValue(Int32)

    Returns the blue channel level of color.

    Declaration
    public static byte GetBValue(int color)
    Parameters
    Type Name Description
    System.Int32 color

    Integer type color value.

    Returns
    Type Description
    System.Byte

    Blue channel level of color.

    GetGValue(Int32)

    Returns green channel level of color.

    Declaration
    public static byte GetGValue(int color)
    Parameters
    Type Name Description
    System.Int32 color

    Integer type color value.

    Returns
    Type Description
    System.Byte

    Green channel level of color.

    GetRValue(Int32)

    Returns the red value of one channel level.

    Declaration
    public static byte GetRValue(int color)
    Parameters
    Type Name Description
    System.Int32 color

    Integer type color value.

    Returns
    Type Description
    System.Byte

    Red channel of color.

    HSLToRGB(Single, Single, Single, ref Single, ref Single, ref Single)

    HSLs to RGB.

    Declaration
    public static void HSLToRGB(float h, float s, float l, ref float r, ref float g, ref float b)
    Parameters
    Type Name Description
    System.Single h

    The h.

    System.Single s

    The s.

    System.Single l

    The l.

    System.Single r

    The r.

    System.Single g

    The g.

    System.Single b

    The b.

    IsKnownColor(Color, ref Color, Boolean)

    Determines whether [is known color] [the specified color].

    Declaration
    public static bool IsKnownColor(Color color, ref Color knownColor, bool useTransparent)
    Parameters
    Type Name Description
    System.Drawing.Color color

    The color.

    System.Drawing.Color knownColor

    Color of the known.

    System.Boolean useTransparent

    if set to true [use transparent].

    Returns
    Type Description
    System.Boolean

    true if [is known color] [the specified color]; otherwise, false.

    IsSystemColor(Color, ref Color)

    Determines whether [is system color] [the specified color].

    Declaration
    public static bool IsSystemColor(Color color, ref Color knownColor)
    Parameters
    Type Name Description
    System.Drawing.Color color

    The color.

    System.Drawing.Color knownColor

    Color of the known.

    Returns
    Type Description
    System.Boolean

    true if [is system color] [the specified color]; otherwise, false.

    RGB(Color)

    RGBs the specified CLR.

    Declaration
    public static int RGB(Color clr)
    Parameters
    Type Name Description
    System.Drawing.Color clr

    The CLR.

    Returns
    Type Description
    System.Int32

    RGB color in integer

    RGB(Int32, Int32, Int32)

    RGBs the specified r.

    Declaration
    public static int RGB(int r, int g, int b)
    Parameters
    Type Name Description
    System.Int32 r

    The r.

    System.Int32 g

    The g.

    System.Int32 b

    The b.

    Returns
    Type Description
    System.Int32

    RGB color in integer

    RGBToHSL(Int32, Int32, Int32, ref Single, ref Single, ref Single)

    RGBs to HSL.

    Declaration
    public static void RGBToHSL(int r, int g, int b, ref float h, ref float s, ref float l)
    Parameters
    Type Name Description
    System.Int32 r

    The r.

    System.Int32 g

    The g.

    System.Int32 b

    The b.

    System.Single h

    The h.

    System.Single s

    The s.

    System.Single l

    The l.

    Events

    RepaintNeeded

    Event that is to be raised when colors are changed and all controls must be repainted.

    Declaration
    public static event EventHandler RepaintNeeded
    Event Type
    Type
    System.EventHandler
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved