Where are color configurations stored?

No need to worry about going "off topic" here
Forum rules
This forum is for general chit-chat, not necessarily APL-related. However, it's not for spam or for offensive or illegal comments.

Where are color configurations stored?

Postby ArrayMac227 on Sat Oct 17, 2015 5:34 pm

As someone whose color preferences extend beyond those of the default color picker, and having learned the details of 24 bit color, I am interested in being able to pull and push the color configuration, allowing me to manipulate the details at will. Twentieth century systems used .ini files, but I'm sure something more modern, like the Windows Registry, is used to store this information. I'm just curious as to where it is? I'm aware of the caveats regarding the Registry, of course.
ArrayMac227
 
Posts: 49
Joined: Sat Sep 12, 2015 1:40 pm

Re: Where are color configurations stored?

Postby MBaas on Wed Oct 21, 2015 7:18 am

The various schemes are stored in the registry-path
Code: Select all
HKEY_CURRENT_USER\SOFTWARE\Dyalog\Dyalog APL/W-64 14.1 Unicode\Colours\Schemes\
(interpreter-spec will vary by version...) - but how the binary data is mapped to the various syntax-elements (and how 24bit-colours could be used there) is beyond me, I'm afraid ;-)
User avatar
MBaas
 
Posts: 156
Joined: Thu Oct 16, 2008 1:17 am
Location: Gründau / Germany

Re: Where are color configurations stored?

Postby Phil Last on Wed Oct 21, 2015 10:05 am

"...\Dyalog APL-64 XX.X Unicode\apltrans\win.dot"

contains mappings of colours for individual elements. But these are defaults for use if a colour scheme is not defined. I suppose you can delete the value in the registry but I haven't dared to try so I always define my own colour scheme through the Options|Colours dialog. Some things are not available there though so they're not included in the colour scheme. One such is the illegible Cyan on Grey of the "Readonly Nested Array" which can only be changed by editing win.dot. There are authority issues with where the edited version ends up. I've managed it occasionally but can never remember how. I've probably asked Vince the same question a dozen times.
User avatar
Phil Last
 
Posts: 507
Joined: Thu Jun 18, 2009 6:29 pm

Re: Where are color configurations stored?

Postby Vince|Dyalog on Tue Oct 27, 2015 2:43 pm

Hi ArrayMac227,

I'll give you some more information about the number data that is stored in our colour schemes registry entries:

[HKEY_CURRENT_USER\Software\Dyalog\Dyalog APL/W 14.1 Unicode\Colours\Schemes\Dyalog]
"Data"=hex:47,00,00,00
,00,00,c0,c0,c0,64,00,00,80,00,64,01,ff,ff,ff,65,00,ff,00,00,66,00,00,00,ff
,80,00,00,00,00,80,00,00,00,00,80,00,00,00,00,81,00,ff,80,ff,81,01,17,74,8a
,82,01,17,74,8a,82,00,ff,ff,ff,83,01,17,74,8a,83,00,ff,ff,ff,84,00,ff,ff,ff
,84,01,17,74,8a,85,01,17,74,8a,85,00,ff,ff,80,86,00,ff,ff,ff,86,01,17,74,8a


Hex 0x47 means 71 entries.

Each entry has 5 columns.

0x84 is 132 and means COL_S_PRIM. This is the syntax colour for primitives.
84,00,ff,ff,ff
the 00 means foreground. 0xff is 255, and 255 255 255 is RGB for white.

84,01,17,74,8a

the 01 means background. RGB of 0x17,0x74,0x8a is 26, 116, 138 and is cyan.

For more RGB examples, you can look at the Colours dialog at Options→Colours

Here are some more definitions:
// Syntax colors

#define COL_S_NOTHING 128 //
#define COL_S_ERROR 129 // error
#define COL_S_LINOS 130 // line numbers
#define COL_S_OUTLINE COL_S_LINOS // outlines in editor
#define COL_S_TSM COL_S_LINOS // Trace/Stop/Monitor in editor
#define COL_S_SYSFN 131 // System Function
#define COL_S_PRIM 132 // Primitive
#define COL_S_LABEL 133 // Label
#define COL_S_LOCAL 134 // Local Variable
#define COL_S_GLOBAL 135 // Global Variable
#define COL_S_NUMERIC 136 // Numeric Constant
#define COL_S_COMMENT 137 // Comment
#define COL_S_CONTROL 138 // Control Structure
#define COL_S_STRING 139 // String constant
#define COL_S_LSYSVAR 140 // Local System Variable
#define COL_S_GSYSVAR 141 // Global System Variable
#define COL_S_DFNNAME 142 // Name in dfn

#define COL_S_DFNDOP 143 // Dfn dyadic operator
#define COL_S_DFNMOP 144 // Dfn monadic operator
#define COL_S_OBJPROP 145 // object property, eg Caption
#define COL_S_OBJPROPLOC 146 // Localized object property f.Caption (with ;f)

#define COL_S_IDIOM 147 // idiom
#define COL_S_URL 148 // urls


#define COL_S_MMCTRL COL_S_ERROR
#define COL_S_BADCTRL COL_S_ERROR
#define COL_S_BADQUAD COL_S_ERROR
#define COL_S_BADSTR COL_S_ERROR
#define COL_S_UNUSED COL_S_ERROR

Regards,

Vince
Vince|Dyalog
 
Posts: 308
Joined: Wed Oct 01, 2008 9:39 am

Re: Where are color configurations stored?

Postby nikll on Mon Nov 30, 2015 8:16 am

Hi Vince. What if in my registry the key is empty:
HKEY_CURRENT_USER\Software\Dyalog\Dyalog APL/W-64 14.1 Unicode
and I have never changed color settings? Apparently APL uses some default syntax colour scheme. How to know, or better how to get syntax colour scheme data in this case?
Thanks.
nikll
 
Posts: 13
Joined: Sat Oct 17, 2015 1:35 pm

Re: Where are color configurations stored?

Postby Vince|Dyalog on Tue Dec 01, 2015 3:39 pm

Hi nikll,

If your HKEY_CURRENT_USER Schemes key is empty, we use the Default colour scheme.

We also have a set of colour scheme registry entries here:
HKEY_LOCAL_MACHINE\SOFTWARE\Dyalog\Dyalog APL/W-64 14.1 Unicode\Colours\Schemes

The Dyalog registry entries in HKEY_LOCAL_MACHINE form a set that gets applied to the HKEY_CURRENT_USER if you have installed for all users of your MS Windows PC and you start Dyalog as a user which has not run Dyalog before.

Regards,

Vince
Vince|Dyalog
 
Posts: 308
Joined: Wed Oct 01, 2008 9:39 am

Re: Where are color configurations stored?

Postby nikll on Wed Dec 02, 2015 9:47 pm

If your HKEY_CURRENT_USER Schemes key is empty, we use the Default colour scheme.


Ok, how to get data of this color scheme? I mean I didn't assign color scheme in APL settings and these registry keys are empty :(. I need this to restore syntax formatting of APL code with data of "200⌶".

By the way, maybe exists some other (easy) way to get APL code in RTF format?

Thanks
nikll
 
Posts: 13
Joined: Sat Oct 17, 2015 1:35 pm

Re: Where are color configurations stored?

Postby Vince|Dyalog on Thu Dec 03, 2015 3:20 pm

Hi Nikll,

Please email me at support@dyalog.com with the version of Dyalog you're using. I can then email you back a .reg file to let you import the colour scheme data.

Alternatively, you could uninstall and re-install if you have the Dyalog installer files.

Our editor does not use RTF. I do not know of an easy way to get APL code in RTF...

Regards,

Vince
Vince|Dyalog
 
Posts: 308
Joined: Wed Oct 01, 2008 9:39 am


Return to Chat

Who is online

Users browsing this forum: No registered users and 0 guests