Native Shopify Mobile App with 20 new features
Kickstart your hyperlocal marketplace in Corona pandemic with a starter guide
Android App Development
iOS App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 18.104.22.168 release ready!
Owner and Founder. Opencart
Long time ago I had written a blog on “Changing background to image” using Palette support library. There I showed you how can we change our layout’s background color as per the Images we are getting from server. You can find it here.
Few days ago I was using this technique to get the visible text color to be shown on an image, but the problem was that I changed between different Swatches and even tried defining a region to the image so that I can get a visible color for my text. Despite trying everything, there was no success, then after a lot of search I came to know that the Palette library actually ignores all the white and black pixels from the image to get the correct value for the swatch and coincidently my image was a white dominant image and thats why I was not been able to get the results.
Actually Palette library applies a default filter while generating the Palette and you can remove that filter using “clearFilters()” method of “Palette.java” class.
And this simple step just solved my problem. You can also set your own Filters to the your palette using “addFilter()” method of Palette class.
Your email address will not be published. Required fields are marked*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.