Schneegans / Gnome-Pie

A pie menu launcher for linux. Read the release announcement of version 0.7.2 at https://schneegans.github.io/news/2018/10/30/gnome-pie-072 Or have a look at the homepage!
http://schneegans.github.io/gnome-pie.html
MIT License
308 stars 54 forks source link

Color extractor for adaptative text color [FEATURE REQUEST] #126

Closed WhippetsAintDogs closed 5 years ago

WhippetsAintDogs commented 9 years ago

I know that we can use the colorize="true" option in themes in order to get the color of the pointed icon and apply it to a given text. But, it would be useful to extract the background color instead in order to get a good contrast between the background and the text. (like a contrast_color="true", to get an adaptative color in the range of white-gray-black.) You already have a similar implementation with your Color Splash! project, so I'm just throwing up the idea :) .

Marc-Antoine

Schneegans commented 8 years ago

Hi Marc-Antoine!

Can you give an example of what you are trying to achieve? Since the extracted color is always quite bright and saturated (this line guarantees a brightness value of one; saturation is always greater than 0.65), dark backgrounds will always work.

BTW, my website uses pretty much the same code for Color Splash.

WhippetsAintDogs commented 8 years ago

imag01069 imag0104 imag0105

For the text in the center, I just don't wan't to use colorize="true" since it overlaps the ring. If the text could understand on what background color it is printed and colorize itself in a white-grey-black color range adaptatively in order to get a good contrast between the two, it'll be awesome.

Schneegans commented 8 years ago

This seems quite difficult because the background you are referring to is not part of Gnome-Pie. What should happen if you open a Pie in front of some high contrast image, such as a checker board? Should every letter adapt its color on its own? What should happen if you open a Pie in front of something which moves, such as a video?

Maybe it would be a better solution to support outlines and drop shadows for text?

BTW, you can make screenshots of gnome-pie with gnome-screenshot --delay 5 :-)