Skip to content

Color Picker: Finalize Color Picker API #32235

@joaomoreno

Description

@joaomoreno

There are two APIs we need to finalize: Monaco and VSCode.

Both APIs are identical except in terms of color formatters: VSCode supports a declarative format for color formats, while Monaco supports more generic function-style formatters.

Discussion Points

  • Color value ranges - We have a very peculiar Color class internally, which has predefined value ranges for color components. RGB is stored in ranges of [0-255], for example. I am more in favor of using floating point [0-1] ranges for all color coordinates in the API. This is what is currently implemented. We just need consensus on the approach.
  • Color.fromHex - I suggest we keep this in proposed state until Color Picker: Integrate inline color boxes #32295 is fixed, at which point it can be completely removed.
  • Color Insertion - The current API works great with colors which are already in the document. Both the API and the color picker widget don't work really well when the user wants to insert a new color. This needs thought. I think we can surface this as a feature request so we can get the API out the door asap.

Metadata

Metadata

Assignees

Labels

editor-color-pickerEditor color picker widget issuesfeature-requestRequest for new features or functionalityplan-itemVS Code - planned item for upcomingverification-neededVerification of issue is requestedverifiedVerification succeeded

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions