How to make gradient color on fonts and make some transparency with color so that you can see thru that color behind? Any examples? Or is it like a transparent font and a background picture made gradient and displaying that?
How to make gradient color on fonts and make some transparency with color so that you can see thru that color behind? Any examples? Or is it like a transparent font and a background picture made gradient and displaying that?
I've been researching color spaces and testing performance. HSV is nice for transitions from Red to Green since it passes through yellow. I tried implementing it, but it requires converting to and from…
You don't color the custom font. Here's something Hermo wrote sometime back, and look at how he does NoFrills
https://developer.garmin.com/connect-iq/connect-iq-faq/how-do-i-use-custom-fonts/…
For anyone wondering how to draw color gradients, here's some code :)
The result isn't entirely smooth, but using a stripy or outline font can hide the steps a bit. There are probably better ways to…
I think you maybe be able to do it with blendMode. https://developer.garmin.com/connect-iq/core-topics/graphics/
Might require using layers as well.
Bump anyone, how to achieve this?
I figured out how to make opacity on circles and rectangles etc, but how can you blend smoothly two colors?
I have made functions to calculate fading to colors like gradient and it works pretty well on simulator, but on the watch it's too heavy in my opinion, so I guess there have to be another simpler way todo this :)
What are you trying to paint? The background and draw on it with characters that have transparent color and black background? Or the letters? I don't think it's a good idea. If you already have a custom font, why don't you have the color in the png file for the characters as we see it on the image? All the heavy lifting is done in pre-processing, and you only copy pixels when you draw.
I think the goal is to do it dynamically and I know it's possible as I've seen it on some watchfaces with user selectable colors. But like you said, it will have a processing cost. It would be nice if Garmin gave us the SDK tools to do this more easily especially now that most new watches have an amoled display. Putting the colors in the bitmap font hasn't worked for me, dc.setColor overrides it.
What color did you use? COLOR_TRANSPARENT?
Yes, transparent. Maybe I'm missing an option in the .fnt file?
I’m trying to paint the hour and min numbers. I have a custom font, but don’t know how to make the gradient work, or can you color the custom font png file and load it coloured?
You don't color the custom font. Here's something Hermo wrote sometime back, and look at how he does NoFrills
That looks nice! Any chance of sharing your code? :)