ColorCandidate

A ColorCandidate object represents a range of text within a document that could possibly be parsed into a ColorInformation object to provide live color annotations in an editor.

Color candidates can be automatically parsed from a document for any syntax tree nodes which utilize the value.color selector classes. Color assistants may then use these candidates for quicker parsing of ColorInformation objects, as opposed to parsing the entire contents of the editor.

The ColorCandidate class is not subclassable.

Added in Nova 5.

Properties

range

The range of the document where the color exists, as a Range object.

This property is settable.

text

The textual contents of the document at the candidate’s range as a String.