cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Highlighting color palette (more colors?)

SOLVED
Highlighted

Re: Highlighting color palette (more colors?)

They most probably created that file by using a source that's much more capable than Prime....

Mathcad.

You can see that by the header, which resembles (equals...) the type used in Quicksheets for Mathcad since version ... very long ago.

That's also the reason why some 'help' sheets for Prime are so clumsy. They just used the converter and apparently did not take the trouble to check if the output still made any sense in Prime, let alone could be improved. (Of course 'improvement' and 'Prime'... two sides of a coin that will only lie flat on the table.)

The foreground colour of the text "MACHINE DESIGN..." is #FF008080.

If I open the sheet in Prime 4 and change the text colour to what Prime4 says it is (in the forground colour selection table a blue hue from the fifth column, the 4th row from the bottom), and save the sheet, it becomes #FF3A6071.

 

Success!
Luc

 

Re: Highlighting color palette (more colors?)


 

So how did they do that...?


They didn't do anything!

As Luc suspected they simply converted an old worksheet which was done in real Mathcad where you could chose the colors as usual and were not restricted to a few preselections.

 

Of course you could always change the colors at will the hard way. Save the worksheet. Rename it as *.zip. Unzip the content and edit the appropriate section in the file \mathcad\worksheet.xml. Save, zip and rename to *.mcdx. Easy color selection the PTC way ;-)

See attached screenshot.

Re: Highlighting color palette (more colors?)

Sadly enough, I have one file I think I need to use that on.  Interesting trick.

Re: Highlighting color palette (more colors?)


@DJF wrote:

Sadly enough, I have one file I think I need to use that on.  Interesting trick.


In this case it might be easier to create a sheet in Mathcad 15 with just one text region in the desired text color, convert it to Prime format and copy the region from the converted sheet into yours. Not sure if the color information survives but it may be worth a try.

Re: Highlighting color palette (more colors?)

I may have to try that.  In theory, your first approach should be simple - just do a global replace of one hex code with another.  And it works fine - for math.  It does not seem to work for text.  It appears that it should - in the file it has the color code and I can successfully change them in the file - no instances of the old color remain.  Yet the color doesn't change.  Am I missing something?

Re: Highlighting color palette (more colors?)

I must confess that I actually never tried to change colors that way. But the section my screenshot shows is that of a text region in the file you linked to. This files used colors not available in Primes selection box, so I guess it should be able to change those colors in that xml file.

EDIT: I just gave it a try and the color change worked indeed.

See the attached worksheet - I changed the color of the text "MACHINE DESIGN AND ANALYSIS" by editing the worksheet.xml and succeeded in doing so.

 

 

 

Re: Highlighting color palette (more colors?)

Well, you did indeed change it - but I'm quite confused.  When I open your worksheet.xml file the only two hex codes I see anywhere are:

 

Foreground="#FF000000" Background="#00FFFFFF"  (Black and white, I think)

 

I also can't find any Time New Roman or Bold callouts, yet they are clearly displayed.  

  

Is the attached the same thing you see?

Re: Highlighting color palette (more colors?)

You're looking in the wrong place.

Going from Prime 3.1(?) to 4 they've changed the location of (at least some types of) text items from the worksheet.xml file to \mathcad\xaml folder.

Now .XamlPackage files are (again) .zip files. You have to look there.

I guess this was all done for a better user experience: the user can look longer to an empty screen, waiting for the contents of the sheet when it is opened...

 

Success!
Luc

Re: Highlighting color palette (more colors?)


  

Is the attached the same thing you see?


No.

When you rename the file I posted to *.zip and unzip retaining the directory structure, there should be a subdirectory "mathcad" and there you find the file "worksheet.xml". Its the only file with this name in the whole archive so I wonder where the file you posted stems from.

I attach the file in question to this post.

 

EDIT: It looks to me that you did not simply renamed the file I posted but rather loaded it in Prime and resaved it, right. Because of the change in format Luc described the files gets much larger that way and the information you are looking for is now in "\mathcad\xaml\FlowDocument2.XamlPackage". As Luc described this is an archive file, too. So rename it to *.zip and unzip again. You will notice another subdirectory "Xaml" and in there the file "Document.xaml". This file now contains the information for the region I changed. I attach this file, too.

EDIT2. The forum software does not allow to attach a *.xaml file, so I had to zip it :-(

 

Conclusion: The new format makes changing colors that way even more uncomfortable and clumsy.

 

 

Re: Highlighting color palette (more colors?)

Yes, I had saved it in 5.0.  

Wow, that's pretty cumbersome.  Mathcad: fighting us every step of the way.

However, under \mathcad\settings\presentation.xml you can set the file's default fonts.  That should actually get me over my immediate color challenge.2019-08-15_10-56-18.png