I'm working on a pixel sprite and I have 2 coloured pixels with 1 empty pixel gap between them. Is there any way (tool) to fill in the missing pixel with the mixture of the 2 that are filled?
-
5What software are you working in?– VincentCommented Jan 8, 2016 at 11:00
-
For blending colors I like chroma.js a lot: vis4.net/labs/multihue/… Maybe this helps in your case, too...– AAGDCommented Jan 8, 2016 at 11:54
-
1The result in general depends on your color space. Taking the average RGB value will not give you the same color as taking the average HSV color.– MSaltersCommented Jan 8, 2016 at 15:19
Add a comment
|
1 Answer
Finding the exact colour code might depend on your current colour space, as mentioned in the comments. This method is colour-space agnostic and whould work in most software that supports layers.
- Draw a pixel of colour A on a new layer;
- Add a second layer on top of that, and draw a pixel of colour B exactly on top of pixel A;
- Reduce layer B's opacity to 50%;
- Merge the two layers;
- Sample the resulting pixel's colour. That is the colour you are looking for.
Alternatively, you could also draw directly over pixel A in layer A with a 50% opaque brush in colour B to get the same effect. Faster, but less intuitive.
-
Err, now the color that is dependent on color model is the median value. Color has a good enough definition to actually have a median color. Easiest way to compute this though is to work in a device independent colorspace. Also nitpicky but you havent actually computed the median but the average.– joojaaCommented Dec 18, 2017 at 15:47
-