Author Topic: Colour palettes  (Read 301 times)

0 Members and 1 Guest are viewing this topic.

Yacine

  • Hero Member
  • *****
  • Posts: 2768
Colour palettes
« on: January 13, 2022, 03:54:59 PM »
I was using integer numbers for assigning colours to shapes. A nice one happened to be color #121 - a pale yellow.
So fine so good, but switching to another document, I find out that here the colours are limited to 24.
Some google hours later I found about colors and color objects in Visio's object model, but no methods to interact with them. Not via GUI and not via VBA.


I enclose both documents (which I stripped off my internal data, leaving only the stuff that seems to matter).


In both documents I put a shape that has a "row_1" property as number and uses it as FillForegnd.
And it increases this prop every time it is duplicated. It does also show the property in its text.


Doc #1 is limited to 24 colors, #2 has well over 100.


Both documents were created by myself from scratch, but I can't tell what I made differently to get more colours in the second one.


Any idea?
Yacine

vojo

  • Hero Member
  • *****
  • Posts: 1594
Re: Colour palettes
« Reply #1 on: January 13, 2022, 08:18:22 PM »
can do RGB and HSU in spreadsheet to give more color control, if you want

for example, purple could be RGB(50,0,50)

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4161
  • Ideas Visio-lized into solutions
Re: Colour palettes
« Reply #2 on: January 13, 2022, 10:03:48 PM »
Using the color palette is probably the least favorable technique.  It's not user editable/definable.  It's not consistent across computing platforms if memory serves correctly.

Try searching the forum...
Visio 2019 Pro

Yacine

  • Hero Member
  • *****
  • Posts: 2768
Re: Colour palettes
« Reply #3 on: January 14, 2022, 05:27:42 AM »
Thank you Vojo and Wapperdude,
I am well aware of the HSL and RGB functions and I actually used them after having got stuck with numbers.
The matter is that I that I use these colors in quite big "state" matrices, where I colorize the drawing differently depending on states. Using simple numbers requires less storage space and is more readable.

The actual purpose of this post is however about how to get control over palettes, to overcome Wapperdudes correct answer about them being unreliable.
What are the right tools/handles to master palettes?
« Last Edit: January 14, 2022, 05:29:55 AM by Yacine »
Yacine

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4161
  • Ideas Visio-lized into solutions
Re: Colour palettes
« Reply #4 on: January 14, 2022, 11:21:37 AM »
Might you be able to make your own list with index?  Not as convenient. 

Also, I think it was John Gold smith who created a color picker...so perhaps you could use that somehow to choose desired color from a "color display"?  Neither option sounds terribly great.
Visio 2019 Pro

vojo

  • Hero Member
  • *****
  • Posts: 1594
Re: Colour palettes
« Reply #5 on: January 14, 2022, 04:32:42 PM »
might be able to put a lookup table on a background page (whatever you do, it should be in the drawing so others can use it)

Somehting like
    AAA    RGB(100,0,0)
    BBB    RGB(0,100,0)
    CCC    RGB (0,0,100)

Use handles of AAA BBB CCC to look up RGB you want

Or maybe do it algorithmically

123 = RGB (1 *100, 2 * 100, 3 *100) kind of thing

Yacine

  • Hero Member
  • *****
  • Posts: 2768
Re: Colour palettes
« Reply #6 on: January 14, 2022, 05:13:43 PM »
might be able to put a lookup table on a background page (whatever you do, it should be in the drawing so others can use it)

Somehting like
    AAA    RGB(100,0,0)
    BBB    RGB(0,100,0)
    CCC    RGB (0,0,100)

Use handles of AAA BBB CCC to look up RGB you want

Or maybe do it algorithmically

123 = RGB (1 *100, 2 * 100, 3 *100) kind of thing

That's what is actually displayed in my first attachments.
Yacine

Yacine

  • Hero Member
  • *****
  • Posts: 2768
Re: Colour palettes
« Reply #7 on: January 14, 2022, 05:15:10 PM »
@Wapperdude,
John's colour picker is fine, but does not help here.
Setting my own list - that's actually what I'm after.
Yacine

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4161
  • Ideas Visio-lized into solutions
Re: Colour palettes
« Reply #8 on: January 16, 2022, 12:55:26 AM »
Here's result of my color by number shape array.  Also, file has 2 interesting links.  Note, the shapes automatically increment by 1 when dropped/copy-pasted.  You can also double click and enter a value.

Cheers.
Visio 2019 Pro

Surrogate

  • Hero Member
  • *****
  • Posts: 1438
    • ShapeSheet™ Knowledge Base
Re: Colour palettes
« Reply #9 on: January 17, 2022, 03:40:46 AM »
John Marshall used to post his designs on TechNet, but now they have been moved to his website
Quote
Colours
This is an Excel file of more than 4,700 colours. It contains the name and RGB values. It is inclusive so there are duplicates but the RGB values may differ and the RGBvalues may have different names. The file also contains reference to the collection names that provided some of the colours.

There you can find a lot of excel tables with colors such as Crayola, Lego Colours, Pantone etc
« Last Edit: January 17, 2022, 07:55:57 AM by Surrogate »

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4161
  • Ideas Visio-lized into solutions
Re: Colour palettes
« Reply #10 on: January 17, 2022, 02:52:52 PM »
In addition, VisioGuy did a similar developemt.  Thanks to Vizisthebest for the reminder.

I've attached a file, really, this time there's a file!  The file includes links to VisioGuy's development.  Plus, there's a dumbied down version that allows you to enter a number and get a fill result.  This is merely an example of what may be done.  There is no logic between numerical entries and the corresponding colors.  But, that's part of the point... create a custom table.  The shape still allows entry from the GUI.
Visio 2019 Pro

Visisthebest

  • Hero Member
  • *****
  • Posts: 519
Re: Colour palettes
« Reply #11 on: January 17, 2022, 03:34:53 PM »
Wapperdude thank you your file works fine:
Choose Colors with Numerical Shape Data Fields.vsdx (24.77 kB)

Visio Guy's old file doesn't work but no worries this works great with your file, thank you I am very happy this works now!
Visio 2021 Professional

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4161
  • Ideas Visio-lized into solutions
Re: Colour palettes
« Reply #12 on: January 17, 2022, 05:25:01 PM »
Very odd.  Wonder if there was some sort of file corruption that was causing the issue???
Visio 2019 Pro

Visisthebest

  • Hero Member
  • *****
  • Posts: 519
Re: Colour palettes
« Reply #13 on: January 18, 2022, 05:46:59 AM »
That is a possibility, maybe a file conversion issue in Visio from older to newer Visio version files that doesn't work properly.
Visio 2021 Professional

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4161
  • Ideas Visio-lized into solutions
Re: Colour palettes
« Reply #14 on: January 18, 2022, 10:47:48 AM »
I did not have that particular trouble.  But my PC, and just mine, none of the others in the house, mangle downloads.  But, for the most part, if I open/execute from the web browser, all is well.  That's a whole different topic though.
Visio 2019 Pro