apache / apache/netbeans

Extend ColorEditor to include alpha channel

Open
#4,680 1 comment 0 reactions 0 assignees View on GitHub
FormDesigner Java kind:feature
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### Description

The `org.netbeans.beaninfo.editors.ColorEditor` class does not support the alpha channel. This `PropertyEditor` is used in various places.

The color chooser UI allows to set the transparency but then it's ignored.
Screenshot 2022-09-24 at 21 59 51

Do I miss something or it's a gap?

You can reproduce it by
1. Create a new JPanel and change the background color
2. Select a color with transparency
3. Close the editor and reopen it, the transparency setting is gone

### Use case/motivation

In some cases one want to select a color with the alpha channel. As a default color editor, it should support it.

### Related issues

_No response_

### Are you willing to submit a pull request?

Yes

### Code of Conduct

Yes

Contributor guide

Open the contributing guide

Research direction

Start with org.netbeans.beaninfo.editors.ColorEditor and reproduce the JPanel background-color workflow described in the issue. Trace how the color chooser stores and restores transparency; done means selecting a color with an alpha channel and reopening the editor preserves that setting.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
desktop, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.