Question by
StrykerWildfire · Dec 18, 2020 at 06:45 PM ·
uiraycastcolorpixel
Pick Color From Image - Unity UI
Good Day,
i am trying to have the player choose a color from a predefined image that i created. Check the image:
Question: How can i get the color of the pixel on the mouse position? Thing to keep in mind is the Alpha Channel: The color should only be choosen when no on the alpha channel.
I have seen various posts trying to solve this in different ways. However i didnt specifically find what i was looking for expecially because the posts are outdated.
Should i use a Raycast?
Should i use GetPixel?
Which format? Sprite? Image? Legacy?
change-color-ui.png
(421.8 kB)
Comment