Skip to content

[BUG] Disable Alpha is not hidding alpha/transparency field in widget #86

@galexrt

Description

@galexrt

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Create a ColorPicker with disableAlpha set on it https://aesoper101.github.io/vue3-colorpicker/?path=/story/example-colorpicker--disable-alpha
  2. Click on "hex" so that the "rgba" mode is enabled.
  3. The text "rgba" is shown and the transparency field can be modified. To note the format of the returned pureColor seems to be correct at least for hex format.

Expected behavior

I expect that when I pass disableAlpha to the component the text rgba -> rgb and the transparency/fourth field is not shown to the user.

Screenshots

image

Additional context

A "hacky workaround" is to hide the toggle completely, though it restricts users to enter hex codes only.

.vc-input-toggle {
    display: none !important;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions