arklumpus / AvaloniaColorPicker

A color picker for Avalonia
GNU Lesser General Public License v3.0
78 stars 6 forks source link

Suggestion For Color Pallete #4

Closed sebastian2357 closed 2 years ago

sebastian2357 commented 2 years ago

Hi,

The color pallete is a cool feature, but I don't need an extra pallete/file manager in my application. It would be great, if would be possible to hide the pallete manager and set/get the colors just by property.

What do you think?

arklumpus commented 2 years ago

Well, in a way you can already do this by hiding the palette manager and creating your own palette control (just make it so that when the user clicks on a colour, you update the Colour property of the ColorPicker.

In any case, if you want a PaletteControl, where you provide a list of colours and the control displays them using hexagons, I should be able to provide that.

However, the point of having the "palette manager" was that the palettes are actually shared between all programs that use this color picker control. This way, a user can create their favourite palette, and then keep using it in different programs. Having custom palettes negates this, so this is something you might want to consider (of course, I don't think that there are a lot of mainstream programs that use Avalonia, and I don't think that many of them use my library, but one can hope that things will change 😂).

sebastian2357 commented 2 years ago

Yeah, I can see your point, but I would say it depends on the workflow or requirements of the users. I can imagine that there are cases for which it makes sense to provide a color palette over several programs, but I guess these are rare.

From my personal point of view I would say in most cases I just want to have the color palette provided by the respective programs.

Yeah, the PaletteControl has a really nice appearance :))

arklumpus commented 2 years ago

Again, sorry for the delay. This is also now implemented in version 1.3.1. Take a look at the PaletteControl and the corresponding page in the Wiki.

Note that the colours in the palette are specified as an ImmutableList; therefore you need to assign a new value to the Colours property every time you want to add or remove a colour from the palette. Of course, you don't have to do this one-by-one; you can create the full ImmutableList beforehand and then use it to set the value of the Colors property.

arklumpus commented 2 years ago

Closing because this should be fixed.