Black and White color

Please use this forum to post feedback and suggestions related to QCAD.

Moderator: andrew

Post Reply
JoseVieira
Newbie Member
Posts: 6
Joined: Sun Jun 30, 2019 11:35 pm

Black and White color

Post by JoseVieira » Sat Aug 03, 2019 1:16 am

Black and White color

At QCad, and others CAD systems, whatever a line is black or white, it will be displayed as a white line over a black background, and a black line over a white background.
Captura de tela em 2019-07-08 20-06-41.png
Captura de tela em 2019-07-08 20-06-41.png (42.88 KiB) Viewed 3932 times
Captura de tela em 2019-07-08 20-06-42.png
Captura de tela em 2019-07-08 20-06-42.png (44.41 KiB) Viewed 3932 times
But when we open files generated by QCad at others Cad softwares like AutoCad or DraftSight, we get black (R=0, G=0, B=0) lines that remains black over black background, as white (R=255, G=255, B=255) lines that remains white over white background.
Captura de tela em 2019-07-08 20-06-43.png
Captura de tela em 2019-07-08 20-06-43.png (71.97 KiB) Viewed 3932 times
Captura de tela em 2019-07-08 20-06-44.png
Captura de tela em 2019-07-08 20-06-44.png (73.4 KiB) Viewed 3932 times
This isn't good when you are working together with people that uses AutoCad and have to ask them to change the background collor of their CAD software in order to see your work.

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 2756
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: Black and White color

Post by Husky » Sat Aug 03, 2019 2:11 am

Have you tried to change the Color Adjustment settings below Graphics View /Appearance ?

"Prevent white on white / black on black display" could solve your issue:


Husky-2019.08.02-01.png
Husky-2019.08.02-01.png (85.81 KiB) Viewed 3929 times
Work smart, not hard: QCad Pro

If a thread is considered as "solved" please change the title of the first post to "[solved] Title...". Thanks!

JoseVieira
Newbie Member
Posts: 6
Joined: Sun Jun 30, 2019 11:35 pm

Re: Black and White color

Post by JoseVieira » Sat Aug 03, 2019 2:20 pm

Dear Husky,

it didn't work. It was already set.
Have you ever notice that before?

José Vieira

JoseVieira
Newbie Member
Posts: 6
Joined: Sun Jun 30, 2019 11:35 pm

Re: Black and White color

Post by JoseVieira » Sat Aug 03, 2019 2:24 pm

Dear Husky,
In order to work at other CAD systems, Black/White color has to be set as "color #7", and not RGB=255,255,255 or RGB=0,0,0.
I don't know how to do that. But, that is.
Vieira

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 2756
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: Black and White color

Post by Husky » Sat Aug 03, 2019 7:02 pm

JoseVieira wrote:
Sat Aug 03, 2019 2:20 pm
Have you ever notice that before?
Not as a compatibility issue ...
JoseVieira wrote:
Sat Aug 03, 2019 2:24 pm
In order to work at other CAD systems, Black/White color has to be set as "color #7", and not RGB=255,255,255 or RGB=0,0,0.
I'm sure you have to deal with this issue right now but that is not a common compatibility issue. A color code called RGB=255,255,255 or Hex #FFFFFF is used everywere as a standard. I never heard about color #7 what makes me thinking that is an AC thing ...

However - I'm sure color #7 is defined by a RGB or HEX code. If you can find out what code is behind color #7 then you can use that to adjust QCAD colors.

But .... I'll be surprised if you find anything else then RGB=255,255,255 or RGB=0,0,0 behind color #7 ... e_surprised
Work smart, not hard: QCad Pro

If a thread is considered as "solved" please change the title of the first post to "[solved] Title...". Thanks!

CVH
Premier Member
Posts: 291
Joined: Wed Sep 27, 2017 4:17 pm
Location: Belgium; Antwerp

Re: Black and White color

Post by CVH » Sat Aug 03, 2019 7:23 pm

It is the fix for ACAD to set the background and objects color to color7.
ACAD option color7 will show black as white over black and invers.

In Qcad we use App.Prefs. to chose this visualization.

It can be color 'Default'
viewtopic.php?f=8&t=6460
or lineweight 'Default' or '0,0'
Lot's of Forum entries

JoseVieira
Newbie Member
Posts: 6
Joined: Sun Jun 30, 2019 11:35 pm

Re: Black and White color

Post by JoseVieira » Sun Oct 13, 2019 4:55 pm

Hi! I,m back.
Thank You, CVH.
I'm working at QCad using black and white colors successfuly, without any trouble shooting. The problem becames when somebody else opens files that I've criated at QCad on their own software, like AutoCad or DraftSight, and they can't see the black lines over a black background.
That's the problem - compatibility.
The good news:
I did note that LibreCad features a Black/White color, instead of Black color and White color, and that works well when we open a LibreCad DXF file at others CAD soft, like DraftSight.
LibreCad seems to understand Black/White color from QCad files, but that's an ilusion. Actually, it converts QCad's Black color to B/W color and QCad's white color to a bright gray that looks like white when over a black background and are still visible over a white background.
As LibreCad is a fork from QCad, I think that introducing Black/White color for QCad should be easy.

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 2756
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: Black and White color

Post by Husky » Sun Oct 13, 2019 10:23 pm

JoseVieira wrote:
Sun Oct 13, 2019 4:55 pm
... features a Black/White color, instead of Black color and White color ...
Interesting!
JoseVieira wrote:
Sun Oct 13, 2019 4:55 pm
... I think that introducing Black/White color for QCad should be easy.
If you think that could be a benefit for QCAD then I would recommend to file a feature request. Here in this forum it could be lost what never happens in a feature request or bugreport. You can do that below:
https://www.qcad.org/bugtracker
Work smart, not hard: QCad Pro

If a thread is considered as "solved" please change the title of the first post to "[solved] Title...". Thanks!

CVH
Premier Member
Posts: 291
Joined: Wed Sep 27, 2017 4:17 pm
Location: Belgium; Antwerp

Re: Black and White color

Post by CVH » Mon Oct 14, 2019 3:08 am

I would like to link to this too:
https://qcad.org/rsforum/viewtopic.php?t=6617

First:
Is there a compatiblity issue? Probably, yes.
Is there a workaround? Yes.

Second:
Is there a common or mainstream solution?
Is ACAD mainstraim? LibreCad?
Does the Qcad way differs greatly from how its commonly solved?

eg.
> If your laser cutter can't handle LineType 'Default', then don't use it.
> Does it have to be 0.00 widht, then use 0.00 as widht.
> Does a drill point have to be a circle instead of a point? ...
> If the CAM I use doesn't understand Polyline Patterns, it serves nothing to parse them as such.
> About 20 years ago CadKey used two list of 16 colors.
One to display (on only a black background), and one to plot (not print).
(printing in color came later)

Half of the files from the orders I get originate from the artistic/printing world.
A dxf saved by Coreldraw or affiliates is based on a white background.
Pdf, the same. Besides that there are other issues with those.
Some send inkscape files, some pictures, some very poor ones too.
Do I reject those orders? No, I adapt.
And I re-adapt sending them files for confirmation.

If I adapt depends a lot on whether I am customer or fabricator/seller.
(And on how my mood is...and theirs)

ACAD uses index7 besides Black, White, Qcad prevents similar colors, LibreCad features a Black/White color.
How does the LibreCad solution works out on ACAD?
What does LibreCad do with index7?
I wonder what happens if we save in ACAD (index7), edit in Qcad, and re-open in ACAD.
Or with other workflows.

SVG export allready has two major methods. Keep the look or keep the geometry.
Why not a dxf export for ACAD, LibreCad, BricsCAD, DraftSight, ... Inkscape...
(only listed the ones mentioned in the latest topics)
Is that not the reason one can create exporters in Qcad.

Not that long ago Lineweight 0.00mm was added for a similar reason I presume.

Like Husky said: If there is something tho gain by, file a feature request.
Maybe something as a fixed custom 'Black/White' color, or even an 'index7' color.

PS:
For what all this is worth, I really don't care.
I just wanted to point out that index7 is in se a fix for their own standard.
I draw on a paper with a ballpoint or a pencil. A white paper. Works out well.
Sitting at a screen I can't concentrate on a white backround longer then an hour.
I am quite happy drawing black on dark in Qcad as it shows as white on black and prints as black.
I don't care lineweights, they mean nothing to me as engraver.
Even less do colours.
In my workflows I also encounter oddities.
I have ways in Qcad to circumvent these.

Regards,
CVH
QCADpro 3.23.0.0 / win7pro 32 bit / 4GB / 1e generation i7 2.6Ghz / HDD GeForce GT 520

John Hyslop
Full Member
Posts: 57
Joined: Mon Sep 30, 2019 6:21 am
Location: Melbourne - Australia

Re: Black and White color

Post by John Hyslop » Sun Oct 20, 2019 4:38 am

As for Index Color 7 (AutoCad)
If you save your file in Qcad as R15 [2000/LT2000] dxf Drawing [Teigha] (*.dxf)
it will display and print properly in AutoCad..using default layer 0 white
For some reason all the other formats up from this change white
to color 255,255,255 which makes it white when you print from
other cad packages ( eg AutoCad ), so it is invisible when printing...
Changing the color to black is a pain, it will print but if the user has a black
background which is the default in AutoCad they will not see or find it very
dificult to see your entities..

This is the only solution for me as I work with AutoCad users, and I know
the format is almost 20 years old but it works perfectly well after all we
are talking about lines, arcs, circles etc.. not much has changed in the newer
versions and this older version opens up fine in AutoCad 2020 which I also have
but I'm so impressed by some of Qcads features I have decided to switch over..

This is my workaround and i also modified the qcad.ini file so I could save in
the above version by default.. see my other posts if you're interested in doing this..
if you stuff it up it’s no big deal simply delete and qcad will create another one..

I might get in trouble here for posting the same info twice, but I personally think
this is a very important issue.. Compatibility with other cad packages...

Ok I'll finish off now..

Cheers
John
IF IT IS TO BE IT IS UP TO ME [ Ten most powerful 2 letter words ]

CVH
Premier Member
Posts: 291
Joined: Wed Sep 27, 2017 4:17 pm
Location: Belgium; Antwerp

Re: Black and White color

Post by CVH » Sun Oct 20, 2019 12:22 pm

Hi All,
Digged some deeper:

AutoCAD Color Index (ACI) RGB equivalents:
http://gohtx.com/acadcolors.php

Origin: Before ACAD 2004 the program worked with just 255 colors.
1-9 are standard colors
250-255 are grays

index0 is no color you use because its the background color.
  • Although usually listed as black #000000 as before the background of ACAD was black.
    It can be any color as does all indexes.
    eg. 2010 standard uses pale yellow RGB = 254.252.240 decimal
but
index0 is also ByBlock (and behaves as an index7 until set by a block)
index7 is white #ffffff (a white that turns darker on a lighter background)
index255 is white #ffffff
index256 is ByLayer
index257 is ByEntity (rarely used as it seems ?! Old form of objects?)

Remark there is no standard ACAD black index.
The closest to black is index 250 RGB = 51.51.51 decimal.
With this deduction I astonished myself later on.

#000000 is Qcad black
...
#ffffff is Qcad white

Besides that there is a lot to find about ACAD remapping.
For one: RGB is remapped to indexcolors if somehow applicable.
You have: Color Books, plotter remapping, Pantone, RAL, DIC...

Drawing in white Qcad uses #ffffff.
What is mapped by ACAD to index255.
It doesn't get mapped to index7 because.......

Furthermore I read that this remapping can be customized.
It seems not that difficult to remap #ffffff to index7.
One of the hints to do this is:
'when opening a valid drawing that displays full black or prints full white'.
And this info came from a not ACAD related forum.

Then I stumble on: dxflib
https://qcad.org/doc/dxflib/2.5/classre ... codes.html
and later found: https://qcad.org/en/90-dxflib


And now everything comes together: :idea:
enum black=250, white=7
Supported DXF format versions for writing DXF R15 (2000)

Saving a dxf as such can't be fooled by ACAD because it is how they did it themselves those days.

I can't find any info on how ACAD is triggered to remap its own #ffffff to index7.
It seems that ACAD technicians can't elaborate on that topic.
As they can't on the 2019 student stamp.

Regards,
CVH
QCADpro 3.23.0.0 / win7pro 32 bit / 4GB / 1e generation i7 2.6Ghz / HDD GeForce GT 520

John Hyslop
Full Member
Posts: 57
Joined: Mon Sep 30, 2019 6:21 am
Location: Melbourne - Australia

Re: Black and White color

Post by John Hyslop » Thu Oct 24, 2019 4:43 am

Thanks for the investigations CVH
2020 AutoCad still uses Index 7 white for layer 0
It would be good if Qcad could imulate this too for
versions up from R15 [2000] dxf :-)

Fingers crossed it will be worked out soon... meanwhile
I'll stick to saving as R15 it suits me and all my customers
who use my files for lasercutting.. even when i was using
AutoCad 2020 I still saved as ver 2000 dxf just for older machine
compatibilty..

Thanks Again for the info :D

PS Just to make things harder AutoCad Changed there default background colour
to RGB 33,40,48 ( a very dark black with a tint of blue and grey ) see screenshot
Attachments
AutoCad 2020.jpg
AutoCad 2020.jpg (76.13 KiB) Viewed 900 times
IF IT IS TO BE IT IS UP TO ME [ Ten most powerful 2 letter words ]

CVH
Premier Member
Posts: 291
Joined: Wed Sep 27, 2017 4:17 pm
Location: Belgium; Antwerp

Re: Black and White color

Post by CVH » Thu Oct 24, 2019 6:06 am

John Hyslop wrote:
Thu Oct 24, 2019 4:43 am
2020 AutoCad still uses Index 7 white for layer 0
It would be good if Qcad could imulate this too for
versions up from R15 [2000] dxf :-)
Sure they still use index 7 internally because its functionality.
Its the remapping in versions after 2004 at their side that spoils it all.
When using R15 [2000] ACAD can't determine if the dxf originated from a genuine ACAD soft or not.
John Hyslop wrote:
Thu Oct 24, 2019 4:43 am
PS Just to make things harder AutoCad Changed there default background colour
to RGB 33,40,48 ( a very dark black with a tint of blue and grey ) see screenshot
Doesn't matter what color ACAD uses as index 0.
Nor does it for Qcad. Nor does it for paper color.

Index 7 is always darker over light and lighter over dark...
The only issue is to get remapped to index 7...

Regards,
CVH
QCADpro 3.23.0.0 / win7pro 32 bit / 4GB / 1e generation i7 2.6Ghz / HDD GeForce GT 520

JoseVieira
Newbie Member
Posts: 6
Joined: Sun Jun 30, 2019 11:35 pm

Re: Black and White color

Post by JoseVieira » Mon Oct 28, 2019 10:16 pm

Thanks Husky, Thanks John Hyslop, and Thanks CVH for all.

CVH
Premier Member
Posts: 291
Joined: Wed Sep 27, 2017 4:17 pm
Location: Belgium; Antwerp

Re: Black and White color

Post by CVH » Tue Oct 29, 2019 2:03 am

This should be fixed.
See:
viewtopic.php?p=25263
QCADpro 3.23.0.0 / win7pro 32 bit / 4GB / 1e generation i7 2.6Ghz / HDD GeForce GT 520

Post Reply

Return to “QCAD Suggestions and Feedback”