ColorInformationContext

A ColorInformationContext object contains contextual information about a request to provide a set of ColorInformation for a TextEditor. A color information context is provided as part of an invocation of the provideColors(editor, context) for a color assistant.

The ColorInformationContext class is not subclassable.

Added in Nova 5.

Properties

candidates

An array of ColorCandidate objects representing possible colors in the document based on the available syntax grammar.

These candidates, if available, are automatically parsed from the document for any syntax tree nodes using the value.color selector classes. Color assistants may use these values for quicker parsing of color values as opposed to parsing the entire contents of the editor.

If no color information could be parsed from the syntax tree, this property will be an empty array.

This property is readonly.