Preview Color3 in-line in scripts (yes, again)

As a Roblox developer, it is currently impossible to preview an overview of all Color3 in-line in scripts in a natural and intuitive way. We can see it currently by clicking into the constructor, but this is not sufficient because I cannot see an overview of all colors at a glance.

This means:

  • Colors cannot be used as landmarks in code so I can’t find certain hotspots just by scrolling. E.g. I can’t find a button by its color in a sea of React.
  • I cannot get an overall understanding of my color choices as they compare to each other, which is a problem because most of the time when I write colors directly into code, it’s for metadata.

I wrote a plugin to preview color3 in the script editor margin, but this plugin fundamentally only supports one single script editor window. We can now have multiple windows open at once. It’s impossible to tie this plugin to multiple windows due to docking complexity. Only one can be active at a time.

This plugin is already dodgy because it requires the user manually dock it in a compatible format, I have to show multiple constructor results just all in a big pile, and the colors are so far divorced from where they’re actually declared that it’s a headache to scan your eyes back and forth from the code to the preview, especially on higher resolutions. Not to mention, there can be a significant amount of your screen taken up by the presence of this widget.

This is what I want. Just a little colored square in-line in text.

Is this impossible with current studio IDE tech?

18 Likes

I imagine it probably isn’t possible right now because it requires supporting inline blocks of arbitrary width, meaning you’d have to be able to nudge characters across and possibly off-grid, which then leads to interesting questions especially when targeting text for selection.

I would quite like the ability to show inline content too though. It’d be useful for showing things like inlay type hints.

1 Like

Ghost text is usually just treated as normal text that you can’t select so it should be trivial to add