Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by sumit47 · Jul 26, 2018 at 04:10 PM · colorimagespritesfill

I have an image of a circle with black boundary and it is filled with white colour. Now i want to fill white portion with red colour by mouse click.

Thanks in advance !

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Cynikal · Jul 26, 2018 at 04:48 PM

Black is black. Black can't be tinted.

If you just set the image tint to red, it'll be the effect that you want.... unless the border isn't true black.

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image brendanperry05 · Jul 26, 2018 at 05:06 PM 0
Share

This is a really good solution for this specific question. I'd go with this unless you'll be using different border colors in the future.

avatar image sumit47 · Aug 01, 2018 at 02:03 PM 0
Share

i have a circle with black boundary and rest of the area is white.

avatar image brendanperry05 sumit47 · Aug 01, 2018 at 02:05 PM 0
Share

Good so try using this answer, it should work

avatar image sumit47 · Aug 22, 2018 at 05:38 PM 0
Share

i have a script that is working properly to detect boundary color that is black , so i have no worry about boundary color detection. what all i need to detect the position of a pixel on which i have clicked by mouse on the image.Please see the uploaded picture in comments to understand deeply. Thanks @Cynikal

avatar image
0

Answer by brendanperry05 · Jul 26, 2018 at 04:46 PM

You could place a red circle over the image in the place you want filled and enable the image when the mouse is clicked.

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image sumit47 · Aug 01, 2018 at 01:58 PM 0
Share

i just want to fill these pixels only that are in the circle. Can you help me out to find the pixel position (x,y) on this image?

avatar image brendanperry05 sumit47 · Aug 01, 2018 at 02:02 PM 0
Share

The circle is made up of a bunch of pixels and that would be a very inefficient way to go about doing this. If there is something else you haven't told us about what you're trying to do then let us know. Otherwise, either one of the two answers you have will work just fine with very $$anonymous$$imal effort.

avatar image sumit47 brendanperry05 · Aug 22, 2018 at 05:29 PM 0
Share

Actually i have a single sprite that contains some partitions with black boundary and i want to fill color with a single click in a specific portion . Please see attached picture so you can get clear idea what i want to do and why?

I don't think so that it will be good approach to use different sprites ins$$anonymous$$d of filling pixels in my case.alt text

fill-color.jpg (92.6 kB)
Show more comments

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

93 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Image Filling To Obtain Color Scale 0 Answers

Create a bar that has 4 colours in it 1 Answer

How to detect color of different parts of a sprite in 2D game, upon collision? 1 Answer

Image UI color not changing when sprite is set via script 0 Answers

Why Sprite is null? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges