Open apcamargo opened 2 hours ago
This behavior comes from the upstream project, VS Code. Here's a screenshot from VS Code:
Note that (unlike Positron) VS Code does not always show color decorators by default; you need to turn it by checking "Color Decorators" (to enable the feature) and "Default Color Decorators" (to show them in all file types).
It wouldn't be impossible to fix it in Positron by patching the behavior, but we'd encourage you to report it upstream. https://github.com/microsoft/vscode/issues
Positron and OS details:
Remote session in:
Interpreter details:
Interpreter-independent.
Describe the issue:
The color preview doesn't render if the file or Jupyter cell starts with the color representation (hexadecimal or
rgb()
).Steps to reproduce the issue:
Write a color code at the beginning of a file or Jupyter cell:
If I add a space before the
#
, the preview will render. Apparently this only happens when the first line starts with the color.This happens for the
rgb()
notation as well (see below). Other color representations (oklch()
,hsl()
, etc.) don't render at all, but this is likely a separate issue.Expected or desired behavior:
Colors should be presented in a consistent manner and not depend on their position in the file.