Hex Colors in JavaScript

I want to use a Hex Value Color in one of my plugins. How do I get the system to recognize it?
If you're making a plugin, bitmap colors are based on hex colors, just make sure to set it as a string.

If you're talking about something like changing the text color in the message window, you'll need to request a custom plugin to allow that.
Number(0x660066) I've tried using that as a color for a gauge background, but it only shows up strictly black.
Use "#660066" (as string).

Original thread: https://forums.rpgmakerweb.com/threads/hex-colors-in-javascript.49532/