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?
Customize default colors
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
- dfriasb
- Senior Member
- Posts: 120
- Joined: Thu Mar 10, 2016 1:08 pm
- Location: Calafell, Tarragona, Spain
Customize default colors
- Attachments
-
- Screenshot from 2018-04-14 11-24-58.png (183.41 KiB) Viewed 19389 times
- andrew
- Site Admin
- Posts: 8791
- Joined: Fri Mar 30, 2007 6:07 am
Re: Customize default colors
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
- andrew
- Site Admin
- Posts: 8791
- Joined: Fri Mar 30, 2007 6:07 am
-
ikua
- Full Member
- Posts: 50
- Joined: Tue Apr 25, 2023 4:07 pm
Re: Customize default colors
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
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
- andrew
- Site Admin
- Posts: 8791
- Joined: Fri Mar 30, 2007 6:07 am
Re: Customize default colors
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.
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
@ikua,
I think that the better answer would be:
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:
We might assume that:
is also valid ...
... But it isn't, the space after the comma is the flaw.
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:
One can revert to standard by hitting the 'Restore to Default Values' button, right-high in the preference page.
Regards,
CVH
I think that the better answer would be:
Because that has been re-coded and changed twice since Andrew's reply above on Mon Apr 30, 2018 11:47 am.If you just want to add custom colors to your QCAD installation, you can NOW simply configure them under:
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,#f0e7daCode: Select all
ikua Color xxxxxxxx, #212c2c... But it isn't, the space after the comma is the flaw.
To include only your custom color in the preference page simply include this line:
Code: Select all
ikua Color xxxxxxxx,#212c2cRegards,
CVH