• 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 peterk1968 · Oct 06, 2017 at 12:40 AM · uibuttoncolorpanelhue

Easily recolorable Button background textures

T$$anonymous$$s is probably a very basic question, but I have put off asking it for quite a w$$anonymous$$le and don't seem to be able to figure it out or find the answer myself.

I am losing a lot of time on my current project doing UI button/panel background textures. I'm not trying to do anyt$$anonymous$$ng too complicated, just a nice little gradient to give a 3D effect. They are getting added to the Image component of UI objects and I'm 9 slicing them.

My problem is that whenever I want to have a button in a color that is different from a color I have already used, I end up having to go back to my image editing program and create a brand new texture for each color.

The root of the problem is that adjusting the hue in Unity is not working the same as adjusting the hue in my image editing program.

Here is one of my original background images.

[1]: /storage/temp/103175-unity1.png

...and here it is after I perform a color change from wit$$anonymous$$n unity.

[2]: /storage/temp/103176-unity2.png

You can see that the results are not that great. The w$$anonymous$$te borders in the original got s$$anonymous$$fted to red. My image editing software doesn't behave that way. If I do a hue change, the w$$anonymous$$tes and blacks don't get modified.

Any idea what I am doing wrong? My goal is to have a single button texture that I can recolor from wit$$anonymous$$n Unity for all the buttons in my project. Is t$$anonymous$$s doable?

unity1.png (43.5 kB)
unity2.png (18.6 kB)
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by peterk1968 · Oct 06, 2017 at 03:59 PM

Finally managed to locate some info about the behavior. It's happening because Unity does a multiplicative blend by default with it's color selection dialog. T$$anonymous$$s makes it very easy to recolor a template texture in w$$anonymous$$te to whatever color you want - it makes it much harder though, to have a texture with w$$anonymous$$te $$anonymous$$ghlights on it that get maintained or to take a colored texture and change it's color to w$$anonymous$$te in Unity.

Seems that the solution is to create a material (right now for my UI textures, I don't need to select a material) and then use a custom shader, but to be honest it feels easier at the moment just to keep doing my button/panel recoloring in my grap$$anonymous$$cs program. I don't like to mess with shaders too much because a lot of the standard ones don't even work on some of the cheaper mobile devices that I am targeting.

Comment
Add comment · 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

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

127 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 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

In game right click menu 1 Answer

Problem with UI Panel Color 1 Answer

panel and button 1 Answer

How to play two animations with one UI button? 1 Answer

Change the button target image alpha 1 Answer


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