Skip to content

A simple C# script that allows for creating UnityEngine Color32 variables via a hex code string

Notifications You must be signed in to change notification settings

muveso/Unity-HexToRGB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Hex To RGB (Unity)

A simple C# script that allows for creating UnityEngine Color32 variables via a hex code string

Usage

import ColorRGBExtension.cs

Color gray = "#7C9EA6".HexToRGB(100);   // modify alpha value (0-255)
Color darkGray = "#83A603".HexToRGB();

Additional

You can check the color dark or light.

Color gray = "#7C9EA6".HexToRGB(100);
if(gray.IsDarkColor())   // check luminance & YIC value
{

}

About

A simple C# script that allows for creating UnityEngine Color32 variables via a hex code string

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages