![]() ![]() To make this possible, libavg is designed as a multi-threaded system and long-running tasks are moved to separate threads. For almost all current systems (and ignoring new developments such as NVidia G-Sync), that means delivering a new frame every 16.67 milliseconds. In libavg, we try to make it as easy as possible to have a consistent framerate that matches the screen refresh rate. Posted in Uncategorized | Leave a reply Raspberry Pi Update More infos on color mixing are in this blog post. So libavg now mixes in CIE L’ch color space, which more-or-less preserves the saturation and looks pretty good.Īs a result, you can now do this: startColor = avg.Color("0000FF")Ĭolor = (startColor, endColor, 1-(i/10.))Īvg.RectNode(pos=(i*20,0), size=(20,20), fillcolor=color, ![]() It turns out that a simple weighed average of the RGB components doesn’t look so good – for instance, mixing 50% red with 50% yellow results gives you gray. Last but not least, I did some research on smart ways to mix colors. Colors can be mixed and used in animations. So… there’s a shiny new Color class that can be constructed from a tuple and passed whereever color strings were expected before (of course, strings still work). That’s nice if you’re copying the code from Gimp or Photoshop, but it was quite limiting if you wanted to actually calculate colors or maybe interpolate between two colors. Libavg has always supported specifying colors in html-like fashion: You pass a string of six hex digits, two each for the red, green and blue components of the color. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |