NeoMatrix
NeoMatrix copied to clipboard
text color customization
add text color for the following settings:
- [ ] day
- [ ] date
- [ ] clock
- [ ] message
colors applys the same way that preserve logo color option works
Hi Mohammad Mahdi,
I would like to work on this issue. Could you please assign it to me?
Thank you!
Best regards, Harsh Tiwari
Hello, Harsh.
Welcome, to the Matrix!
Feel free to ask any questions that comes up.
Good Luck.
Hi Mohammad Mahdi,
Thank you for assigning this issue to me. I will start working on it right away.
Best regards, Harsh.
Hi Mohammad Mahdi,
I hope this message finds you well. I wanted to inform you that I have recently submitted a Pull Request to your repository NeoMatrix. The Pull Request introduces a new feature that add text color customization to Day, Date, Message, and Clock settings. This enhancement aims to improve the user experience by providing more personalization options, making it easier for users to categorize and prioritize their tasks visually.
I would greatly appreciate it if you could take some time to review the Pull Request at your earliest convenience. Your feedback and suggestions would be invaluable in ensuring the quality and functionality of this new feature.
Thank you for maintaining this open-source project and considering my contribution. Looking forward to your feedback.
Best regards, Harsh.
ok, i think i had to explain the methodology a bit more, as it is not completely clear.
-
to apply color on the texts, there is a method: https://github.com/IPdotSetAF/NeoMatrix/blob/1c7c55ef2ff4e8945c7489c076711304def60346/js/index.js#L1117
this method calculates the color of any character on the screen.
-
to store persistence text, we have a matrix that holds these characters, called
staticChars: https://github.com/IPdotSetAF/NeoMatrix/blob/1c7c55ef2ff4e8945c7489c076711304def60346/js/index.js#L895
Step 1
- now we need to store and recall the color of any character on the screen, therefore we have to add another dimension to the
staticCharsmatrix to store it's color. - for memory optimizations we won't store the color itself in that matrix but only a reference to it being
{null: not specified, 0: dayColor, 1: dateColor, 2: messageColor, 3: clockColor} - for performance measures and to skip usage of a switch case in
calculateColor()function, we have to add another array calledcolorPalletthat holds all 4 static colors in the previously given index(0:day, 1:date, 2:message, 3:clock) - in the
calculateColor()function, you should have a look up into the newly structuredstaticCharsmatrix and if the value corresponding the character color was notnull, look up the color fromcolorPalletarray and return it.
Step 2
- we need to input the colors properly and store theme inside the
colorPallet, for that, foronChangeofui_..._higlightandui_..._textColoryou need to call 2 functions in this order- another new function called
fillColorPallet()this function will fill the array ofcolorPalletfrom options object. updateMask()
- another new function called
Step 3
now we need to fill the staticChars matrix. there are two scenarios
textScale == 0: in this function : https://github.com/IPdotSetAF/NeoMatrix/blob/1c7c55ef2ff4e8945c7489c076711304def60346/js/index.js#L876 input the color reference and insert it into thestaticCharsmatrix.textScale > 0: ~still no solution~