Windows icon indicating copy to clipboard operation
Windows copied to clipboard

ColorPicker palette with transparency

Open Mangepange opened this issue 3 months ago • 3 comments

Describe the bug

When using an IColorPalette with colors having transparency, they are not displayed with the checkered background that is usually used when indicating transparency.

Image

Steps to reproduce

Implement an IColorPalette with colors having transparency.

Expected behavior

The palette should display colors with a checkered background when having transparency .

Screenshots

No response

Code Platform

  • [ ] UWP
  • [ ] WinAppSDK / WinUI 3
  • [ ] Web Assembly (WASM)
  • [ ] Android
  • [ ] iOS
  • [ ] MacOS
  • [ ] Linux / GTK

Windows Build Number

  • [ ] Windows 10 1809 (Build 17763)
  • [ ] Windows 10 1903 (Build 18362)
  • [ ] Windows 10 1909 (Build 18363)
  • [ ] Windows 10 2004 (Build 19041)
  • [ ] Windows 10 20H2 (Build 19042)
  • [ ] Windows 10 21H1 (Build 19043)
  • [ ] Windows 10 21H2 (Build 19044)
  • [ ] Windows 10 22H2 (Build 19045)
  • [ ] Windows 11 21H2 (Build 22000)
  • [ ] Other (specify)

Other Windows Build number

No response

App minimum and target SDK version

  • [ ] Windows 10, version 1809 (Build 17763)
  • [ ] Windows 10, version 1903 (Build 18362)
  • [ ] Windows 10, version 1909 (Build 18363)
  • [ ] Windows 10, version 2004 (Build 19041)
  • [ ] Windows 10, version 2104 (Build 20348)
  • [ ] Windows 11, version 22H2 (Build 22000)
  • [ ] Other (specify)

Other SDK version

No response

Visual Studio Version

No response

Visual Studio Build Number

No response

Device form factor

No response

Additional context

No response

Help us help you

Yes, I'd like to be assigned to work on this item.

Mangepange avatar Oct 13 '25 07:10 Mangepange

There is also a problem, that is, the initial color setting does not take effect. No matter what value the color is set to, it will be reset to #00ffffff. I studied the source code and found that it might be the initial value conversion problem caused by the converter of the selectedvalue of the GridView below, but I cannot replace this converter through resources, so it is difficult to verify. https://github.com/CommunityToolkit/Windows/blob/fae89405e770e8a697acabf9045b9b8512df0356/components/ColorPicker/src/ColorPicker.xaml#L287-L296 https://github.com/CommunityToolkit/Windows/blob/fae89405e770e8a697acabf9045b9b8512df0356/components/ColorPicker/src/Converters/NullToTransparentConverter.cs#L16-L20

bluelaze avatar Oct 18 '25 15:10 bluelaze

Your problem sounds related to this issue where the initial value is reset: #685

Mangepange avatar Oct 22 '25 07:10 Mangepange

Your problem sounds related to this issue where the initial value is reset: #685

Oh yes, I didn't notice this issue, when I saw your latest issue, I thought it was also related to colorpicker, so I replied,sorry.

bluelaze avatar Oct 22 '25 12:10 bluelaze