sch-rnd-aux knowledge pool

 

The fill-gray-threshold export option

fill_gray_thrs by Tibor 'Igor2' Palinkas on 2022-08-11

Tags: insight, export, monochrome, color, black, white, gray, grey, title, box, block, background, fill, polygon, box, rectangle

node source

 

 

Abstract: There are different colors on the screen for a drawing, which would translate fine to grey-scale in non-color export. In monochrome export we want to use black and white only, to have high contrast. Plus different slightly shades of grey wouldn't help as much in telling wires apart from symbol graphics as blue vs. green on screen. However, converting everything to black fails when it comes to the light background fill of the titlebox.

  The problem is that the code doesn't know why it fills a polygon, whether it'd be a light background fill or whether it will be a solid fill (like in the little arrow of a BJT). So there can't be a solution that works differently for titlebox in rendering.

There are the following possible cases with any exporter:

sch-rnd implements 1 and 4 in ps, eps and png exports. There's a new setting called fill-gray-threshold which is in percentage between 0 (dark black) and 100 (bright white). It affects only polygon fills. If a fill color is brighter than the set percentage, the code will do a proportional gray fill, else it keeps black (for the contrast). Default value is 80%.

It is not done in color export, so 1 is kept intact.