← Back to team overview

kicad-developers team mailing list archive

Re: Enhanced palette for kicad

 

On Tue, Apr 02, 2013 at 08:42:50PM +0200, jp charras wrote:

> There is an issue for the color used to draw pads through,
> which depends on the colors chosen for the front and back side pads:
> for instance, with front = Red2 and back = green3 the pads through
> are black.

Working on it. It seems that they are combined so that the previous
relationship don't hold. In other words, RGB are ORed correctly but
*color numbers* not. The old palette was very much like the dos palette
(unsurprisingly)

0000
^    Intensity
 ^   Red
  ^  Green
   ^ Blue

So that, in fact, 8 (darkdarkgray) is actually 'bright black'. ORing
indexed gave good results. Having reorganized them it's not so simple
anymore (what about red 2 mixed with blue 3 ? is that magenta 2 or
magenta 3?). I don't want to introduce a full colorcube (otherwise just
junk EDA_COLOR_T and go truecolor, the memory usage is the same...) 
so maybe the best way is to combine the RGB and find the 'nearest'
color. And then caching the result. It's a classic color palette
algorithm. Or maybe devise a clever rule, it will need experimenting.

-- 
Lorenzo Marcantonio
Logos Srl


References