Was a little inspired by that color app that was p...
# compose-desktop
c
Was a little inspired by that color app that was posted earlier today and I got to thinking that I maybe want to build a color picker app. Does compose desktop allow you to hook into accessibility on mac in order to grab colors from other apps? Or would I have to build a native mac app to access those apis?
j
That isn't a compose-specific question, as you would use the same APIs that you would use for any desktop Java application. I don't think there are any pure Java APIs to do that, but you could certainly achieve it using a bit of JNI.
c
Sorry. As an Android dev all of this is still very new to me. I guess what you said makes sense though that anything that you can typically do in desktop java, you can do with compose. Thanks
r
java.awt.Robot might do what you want
👍 1
k
On Big Sur, using those Robot APIs will pop up a security warning and the user will need to grant Java runtime the relevant permissions
r
FTW it’s true of native apps that want to read the screen to pick colors as well