bluenote10 / yachalk

🖍️ Terminal string styling done right
MIT License
161 stars 3 forks source link

Added the `inverse` style modification method #18

Closed Mani4D46 closed 3 months ago

Mani4D46 commented 3 months ago

I wasn't able to find the inverse style modification mentioned in the README.md after further investigations I found that the inverse style modification is not implemented so I implemented it myself.

I did not use the CSI 7 m as it is not widely supported, I implemented my own system which converts the foreground to background and the background to the foreground

bluenote10 commented 3 months ago

Did you look into how it is done in the upstream implementation of chalk? My goal was to solve #17 exactly the way chalk does it so that the two implementations stay the same.

Mani4D46 commented 3 months ago

uhh sorry I don't understand what you are talking about can you elaborate more?

also sorry for my bad english

Mani4D46 commented 3 months ago

I'm new to this contribution thing of open-source can you explain what you mean by upstream implementation? I cannot find any branch with a related name

bluenote10 commented 3 months ago

Sorry for being a bit cryptic :wink:

This project here is basically a port of the "original" chalk in JavaScript: https://github.com/chalk/chalk

When I was migrating the project I was trying to stay relatively close to the original so that I can easily backport and adapt changes made there. Admittedly I haven't looked into the original implementation for a while, which is also why I may have missed the inverted feature. My goal regarding the feature would be to implement it similarly to avoid diverging too much.

I'm currently running low on time, which is why it may take a bit until I can analyze the original implementation.