Skip to content

Unity Editor Addon | Keyboard Shortcut for converting copied text like "rgb(66, 180, 255)" to "new Color(0.26f, 0.71f, 1f)".

Notifications You must be signed in to change notification settings

BIRD-COMMAND/ColorConverterUtility

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

ColorConverterUtility

Unity Editor Addon

Convert your clipboard text from something useless like this:

  • rgb(66, 180, 255)

to something useful like this:

  • new Color(0.26f, 0.71f, 1f)

With a handy keyboard shortcut: Shift+Alt+C

Thanks, science.

  • Converts 0-255 integer-style RGB information to UnityEngine.Color constructor format with a keyboard shortcut.
  • If the conversion is successful the result is copied to the clipboard, overwriting previous clipboard text.
  • Clipboard text remains unchanged if conversion fails.
  • Logs a message to the console to provide a visual indication of success or failure.
  • Place the script in "Assets/Editor" in your project directory.

Preview (Gif/Webm)

https://gfycat.com/ancientnaughtydrongo

About

Unity Editor Addon | Keyboard Shortcut for converting copied text like "rgb(66, 180, 255)" to "new Color(0.26f, 0.71f, 1f)".

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages