[addon] Permanent colors

Here’s an installation link:
https://raw.githubusercontent.com/ChrisRaven/FlyWire-Permanent-colors/main/Permanent-colors.user.js

The addon allows you to set a color to your segment and the color will stay with the segment despite splitting, merging or recoloring.
Each newly claimed cell will have the color assigned automatically, so you won’t have to do anything.
However, you can assign color manually.
Only one cell can be tracked at any given moment, even if you’re working in different tabs.

After installing, click the “Addon” link in the left side menu. It should show you the Dock container at the top of the site. If you’ve already installed the Presets addon before, the Permament colors might be displayed on top of it, or under it. Just press the A button in the top right corner of the Dock and reposition both addons whereever you want them.
If everything was ok, you should see four color patches in the Dock. You can select color for any of them by left-clicking on them. There are four possibilities, so you can have up to four favourite colors, however, as said before, only one cell/segment can be actively tracked. To choose, which color should be used, right-click on any of the patches.
Right-clicking also selects a cell/segment to track. Whereever the center of the axis was set during the clicking, that segment will be coloured and tracked.

TL;DR:

  • open the Dock (by clicking the Addon link)
  • left click ony any of the patches to set their colors
  • position the axis inside the cell/segment you want to track
  • right-click on one of the color patches to start tracking the cell with the clicked color

TL;DR when claiming new cell:

  • if you have already selected your favourite color, you don’t have to do anything.

Currently selected patch of color will have a white border around it, and that color will be used for everything.
If you are already tracking a cell and want to change its color, just left-click on the color patch and select color you want. No need to position the axis and to right-click on the patch.

Sorry, if the description isn’t the best. Hopefully, everything is easy to use.

As always, if anything doesn’t work or you’d like to propose some changes or additions, post your suggestions in this topic.

Enjoy :slight_smile:

P.S.
It took me so much more time than I expected:D At least, I’ve learned some new stuff doing it :slight_smile:

List of things, I’m planning to do:

  • fix some issues with the Presets addon,
  • restyle more elements with the Restyle addon,
  • create a Utilities addon to add there all the smaller suggestions, you’ve all made.
7 Likes

Thank you for working on this!

So far I have not been able to get this to work. I have only Restyle + Permanent Colors added.

The color docks appear, and I can see the color selector with left click, but no color actually changes in the dock display, and right clicking on a segment does not change the color.

You have to position the center of the axis inside your segment (by right-clicking on it or moving with arrows or scrolling - as you have in your example) then right-click on any of the colors.
Left click is for selecting a color, right click is for associating it with the current segment (the segment at the point of the axes).

Yes sorry - even with the default addon colors nothing is changing. This video shows me right clicking multiple times on each option (my recording software isn’t showing mouse clicks/mouse click types here, apologies, but that is what I’m doing.)

Got the console to cooperate with me, these are the errors I’m getting:

userscript.html?name=Permanent%2520colors.user.js&id=a62167af-c542-4575-931b-aa2d46307a34:150 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'layer_')
    at changeColor (userscript.html?name=Permanent%2520colors.user.js&id=a62167af-c542-4575-931b-aa2d46307a34:150:27)
    at userscript.html?name=Permanent%2520colors.user.js&id=a62167af-c542-4575-931b-aa2d46307a34:208:36
    at userscript.html?name=Permanent%2520colors.user.js&id=a62167af-c542-4575-931b-aa2d46307a34:109:7
changeColor @ userscript.html?name=Permanent%2520colors.user.js&id=a62167af-c542-4575-931b-aa2d46307a34:150
(anonymous) @ userscript.html?name=Permanent%2520colors.user.js&id=a62167af-c542-4575-931b-aa2d46307a34:208
(anonymous) @ userscript.html?name=Permanent%2520colors.user.js&id=a62167af-c542-4575-931b-aa2d46307a34:109
Promise.then (async)
getRootId @ userscript.html?name=Permanent%2520colors.user.js&id=a62167af-c542-4575-931b-aa2d46307a34:105
(anonymous) @ userscript.html?name=Permanent%2520colors.user.js&id=a62167af-c542-4575-931b-aa2d46307a34:208
onload @ userscript.html?name=Permanent%2520colors.user.js&id=a62167af-c542-4575-931b-aa2d46307a34:96
it @ VM32:14
(anonymous) @ VM35:18
it @ VM32:14
a @ VM35:3
(anonymous) @ VM35:4
(anonymous) @ VM32:6
M @ VM32:6
s @ content.js:107
n @ content.js:108
setTimeout (async)
setTimeout @ content.js:121
processMessage @ content.js:124
(anonymous) @ content.js:128
(anonymous) @ content.js:108
it @ VM32:14
D.<computed>.I.<computed> @ VM32:4
it @ VM32:14
y @ VM32:6
send @ VM32:7
r @ VM35:4
setTimeout @ VM35:4
i @ VM35:18
(anonymous) @ VM35:25
await in (anonymous) (async)
(anonymous) @ VM35:26
te @ VM35:24
(anonymous) @ VM35:25
(anonymous) @ VM35:9
it @ VM32:14
t @ VM32:15
message @ VM35:9
message @ VM35:10
(anonymous) @ VM35:66
M @ VM32:6
s @ content.js:107
send @ content.js:108
postMessage @ content.js:109
(anonymous) @ content.js:119
s @ content.js:118
(anonymous) @ content.js:118

Ok, thank you for reporting. I’ll take a look into it.

Edit: I see in your example, that you’re testing it in the sandbox. The tab with the segments is named differently, than in the production and that’s causing the issue. I’ll add the sandbox’ graph tab.

And you’re right. I was constantly testing with the basic colors and totally forgot to save info, if the selected colors were different. Stupid me :smiley:

No problem.

Update: when I claimed a new cell, it DID change the segment (started with) the preferred color selected (gray). The addon still displays the four basic colors but apparently part of the preference did save.

Version 0.1.1 should now work with all three datasets (Sandbox, Testing, Production).
Colors are now should be saved nad restored between refreshes.

I found an issue, that when trying to recolor an old segment (with black lightbulb icon) it won’t recolor the segment, but its most up to date version. Not sure, if the issue is big enough to fix it.

1 Like

I’m also having trouble with the script. On Mac if that makes a difference.
Screen Shot 2022-06-14 at 10.35.05 AM

Is there any chance, that you don’t have the graph layer opened or the layer is named something other than “Production-segmentation_with_graph” (or its Sandbox and Testing counterparts)?

Ah yes. I’m working in a different chunk of cells where the 2nd layer is named “Production Segmentation” rather than “Production-segmentation_with_graph.” Didn’t realize that could cause an issue

1 Like

Unrelated, but the “R” resize button also does not work for me. Not a huge issue, but shrinking the size of the box would be useful.

Ok, I’ll add the name to the addon, and it should work on that other layer too.

Are there any errors in the console after clicking the button?


also, to clarify the layer is called “Production segmentation” - if caps are important

Yes, caps are important, so thanks for the update and thanks for the error report.
New version (0.1.2.1) should work on that other layer too. Maybe I’ll find a more universal way to recognize those layers. In the mean time, it’s a case by case scenario.

As for the resizing, I still have to look at it.

Great thank you! And appreciate the feature, recoloring with easily viewable colors is definitely nice to have

1 Like

Just wanted to say I haven’t had any issues since the update - it’s working great and is perfect for my preferred workflow, especially on large ‘bouquet’ types such as my current WIP down below. Very helpful when picking a color that won’t be selected by the random recolor tool like the light grayblue I’m using now.

3 Likes

Hi KK,

Thanks so much for making these scripts! I have another tab name to add to the list. It is simply called “Production” (I know, right?). Thanks in advance!

Done! (ver. 0.1.2.2)
You’re very welcome :slight_smile:

1 Like

The resize error also should be fixed now. You don’t have to update anything, just refresh the browser (hard refresh if needed) and the R button should work.

I’m thinking about making the whole Dock more transparent and floating, just like the Toolbox in Eyewire. We’ll see.

1 Like