Laur IVAN

Replace a colour in an image with imagemagick

Posted by in IT, Tutorial

I had to change the colour of some monochrome icons for a personal project, from black to something else (i.e. not black). I’ve tried in python with PIL. Unfortunately, my attempts to use ImageOps failed miserably, because I’m working with RGBA images, not RGB :(. Of course, one could separate the RGBA in two, perform the operation and replace the RGB channels with the updated variants, or even do a pixel-by-pixel search (aka overkill). Since this is more or less a one-off operation, I’ve looked at other ways. I remember…read more

LibGDX drawPixel has Wrong Colours

Posted by in Software

TL;DR: Note that Pixmap.drawPixel(x, y, colour) expects a RGBA8888 colour, even if the pixmap is not RGBA8888. Today I wanted to create a background with a bunch of different pixels and I had a lot of problems, displaying different colours from what I had in my array. The process is simple: Pixmap > Texture > Sprite, with the colours being filled up in the pixmap using Pixmap.drawPixel(x, y, colour). My Pixmap was created as RGB888, so I expected to draw the pixel with a RGB888 colour. NO! you need RGBA888! Ouch! At the end…read more

Create a Background with Vertical Lines of Different Colours

Posted by in Software

I’ve got a list of colours (RGB) in an array and I want to build a background with vertical lines, each representing a colour from my list. The process is too simple to put in a TL;DR :) If my list of colours is, Array<Vector3> cols, then the process is as follows: Create a pixmap:

Set one pixel with the corresponding colour in the list:

Create a texture off the pixmap:

Create a Sprite and resize it:

This will create a sprite as large as your screen….read more

Picking Colours for Your Application

Posted by in Software

While working to get a theme for my new app Epso View (Play and Amazon), I’ve identified two types of websites: Inspiration (like dribbble or materialup) Combinations (like colourlovers or materialui) You can use the inspiration sites to get inspired; what colours work together, would your app look light or dark… Then, you can use the combinations to get the colours together. A little experiment: If you find this post and ad below useful, please check the ad out :-)

Material Palette Resources

Posted by in IT

Today I wanted to change the colours of my app (still in alpha). Since I want to be material, I went looking for material links. Here are some things I found: A Stack Exchange question on how to programmatically generate a monochromatic palette A material color generator materialpalette.com – cool material picker materialui.co – you can pick individual colours (primary and secondary) to see how it would look on the app HTH, A little experiment: If you find this post and ad below useful, please check the ad out :-)