Customize default colors

Use this forum to ask questions about how to do things in QCAD.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
User avatar
dfriasb
Senior Member
Posts: 120
Joined: Thu Mar 10, 2016 1:08 pm
Location: Calafell, Tarragona, Spain

Customize default colors

Post by dfriasb » Sat Apr 14, 2018 10:32 am

Hello all,

I was asking me if it is possible to customize the default colours palette, the one I show in the attached image. I was looking for some file in qcad folder (color library or something like this) but I didn't find anything.

Do you know how to modify the colours list of that menu?
Attachments
Screenshot from 2018-04-14 11-24-58.png
Screenshot from 2018-04-14 11-24-58.png (183.41 KiB) Viewed 19372 times
David Frías Barranco | architect
[email protected] | davidfriasarquitecto.es

User avatar
andrew
Site Admin
Posts: 8791
Joined: Fri Mar 30, 2007 6:07 am

Re: Customize default colors

Post by andrew » Mon Apr 30, 2018 10:47 am

I've added RColor.addColor("MyColor", new RColor(r, g, b)) to the QCAD API for the next release.

jvalencia
Full Member
Posts: 51
Joined: Mon Jun 29, 2015 8:26 pm

Re: Customize default colors

Post by jvalencia » Sat Jun 23, 2018 7:51 pm

andrew wrote:
Mon Apr 30, 2018 10:47 am
I've added RColor.addColor("MyColor", new RColor(r, g, b)) to the QCAD API for the next release.
I also find this feature useful. What does it mean? that it will be supported in new versions? or someone can make a plugin for that?

User avatar
andrew
Site Admin
Posts: 8791
Joined: Fri Mar 30, 2007 6:07 am

Re: Customize default colors

Post by andrew » Mon Jun 25, 2018 4:42 pm

jvalencia wrote:
Sat Jun 23, 2018 7:51 pm
I also find this feature useful. What does it mean? that it will be supported in new versions? or someone can make a plugin for that?
It's part of the next release.

ikua
Full Member
Posts: 50
Joined: Tue Apr 25, 2023 4:07 pm

Re: Customize default colors

Post by ikua » Fri May 16, 2025 1:25 pm

Hello!

I do not understand how this should work. I enter the following in the script shell and nothing changes in the color selection:
RColor.addColor("xxxxxxxx", new RColor(33,44, 44))

would be big help to have this custom colors.

greets ikua

User avatar
andrew
Site Admin
Posts: 8791
Joined: Fri Mar 30, 2007 6:07 am

Re: Customize default colors

Post by andrew » Fri May 16, 2025 1:39 pm

If you just want to add custom colors to your QCAD installation, you can simply configure them under:
Edit > Application Preferences > General > Color Palette

The import button takes you to many preconfigured color palettes that come with QCAD.

CVH
Premier Member
Posts: 4958
Joined: Wed Sep 27, 2017 4:17 pm

Re: Customize default colors

Post by CVH » Sat May 17, 2025 6:06 am

@ikua,

I think that the better answer would be:
If you just want to add custom colors to your QCAD installation, you can NOW simply configure them under:
Because that has been re-coded and changed twice since Andrew's reply above on Mon Apr 30, 2018 11:47 am.
Defining custom colors (QCAD Pro) was added in 2021 and later updated to the current state including a vast list of pre-defined palettes.

Strangely RColor.addColor(..) works for the Layer combo box but not for the entity combo box.
The difference would be that the first list is limited and does not display 'By Layer' or 'By Block' for example.
But it is also overwritten every next change to the color list or on any re-initialization.

RGB(33, 44, 44) is equal to #212c2c
As importing a palette in the preference page lists for example:

Code: Select all

3M 160-30,#eff3ee
3M 180-10,#f0f3f1
3M 100-10,#f9f9f4
3M 100-20,#f9f8f5
3M 100-383,#f0e7da
We might assume that:

Code: Select all

ikua Color xxxxxxxx, #212c2c
is also valid ...
... But it isn't, the space after the comma is the flaw.
:arrow: Trimming leading and/or trailing whitespace for both parts would have been a neater solution.

To include only your custom color in the preference page simply include this line:

Code: Select all

ikua Color xxxxxxxx,#212c2c
One can revert to standard by hitting the 'Restore to Default Values' button, right-high in the preference page.

Regards,
CVH

Post Reply

Return to “QCAD 'How Do I' Questions”