tiaguinho/material-community-components

request(feature:color-picker) Support different color formats than HEX

motabass opened this issue · 3 comments

There should be the possibility to configure the format of the color-code input currently only supporting hex.

Following formats could be support depending on if alpha selector is enabled:

Non alpha:

  • hex: #ffffff
  • rgb: rgb(255,255,255)
  • hsl: hsl(360, 100%, 100%)
  • hsv: hsv(360, 100%, 100%)

With alpha:

  • hexa: #ffffffff
  • rgba: rgba(255,255,255,1)
  • hsla: hsla(360, 100%, 100%, 1)
  • hsva: hsva(360, 100%, 100%, 1)

for input by user also hex codes in the form of #fff and #ffff could be supported. The Input should be parsed and applied on blur or ⏎

prepared by #142

in #142 there is only support for rgba and hex6 as component-input-strings not inside the hex input of the picker. I#d like to tackle this in another PR.

Different color string formats for inputs and outputs are supported with #149.

The format on the ui still is hex(a) and rgb(a), where support for hex8 (#FFFFFFFF) was newly added. hex3 (#fff) and hex4 (#ffff) are also still not supported on the Picker-UI yet. This will be another PR