Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not load colour scheme #4

Closed
arcticpinecone opened this issue Mar 1, 2024 · 5 comments · Fixed by #5
Closed

Could not load colour scheme #4

arcticpinecone opened this issue Mar 1, 2024 · 5 comments · Fixed by #5

Comments

@arcticpinecone
Copy link

Hello, and it's great to see this in development again.

Ever since I started using this package, I get this error message:

Could not load colour scheme.
Falling back to a blank colour scheme.
To fix this, please manually re-select your colour scheme in Preferences > Color Scheme
This should not happen again once action has been taken.
Sorry for the inconvenience.

I use the Default Dark theme, and I have also tried setting the 'Select Color Scheme...' and setting it to simply 'Auto'.
I prefer to use Monokai Pro if I can, but I changed it to try and fix this option.

Unfortunately, the behavior continues no matter what I have tried so far, and thus, every time I compare, it errors, and then finally comes to the basic black on white 🤐

Thank you again for developing this, and appreciate any possible help. If you need anything from me let me know.

@kaste
Copy link
Owner

kaste commented Mar 1, 2024

Ah, that's a useful notice. I'm old and ... well ... I'm using only the old scheme/file format from the beginning of Sublime Text. Maybe this plugin is from the old days and just doesn't understand the "new" format.

Likely we don't even need this work-around as Sublime ships with appropriate diff colors since they have the inline diffing/git support. We'll see.

kaste added a commit that referenced this issue Mar 1, 2024
Since Sublime ships with the basic git support, it also has a diffing
feature and with it defines standard colors for inserted/deleted lines
or (intra-line) chars.

We have `diff.inserted` and `diff.inserted.char` usually in green and
`diff.deleted` in red.  Every color scheme should already define them.
User can change their scheme as usual and change the colors to their
liking.

Note that I add the suffix `.sbs-compare` to the scopes (e.g.
`diff.inserted.sbs-compare`) so users can also target exactly our
scopes.

Closes #4
@kaste kaste mentioned this issue Mar 1, 2024
@kaste kaste closed this as completed in #5 Mar 1, 2024
@arcticpinecone
Copy link
Author

Just wanted to say thank you for such a fast fix! It is sincerely appreciated! 🙏

@LouDnl
Copy link

LouDnl commented Mar 2, 2024

This came rather unexpected... I get that you changed the way the colors are handled, but for the life of me I cannot get them back to the ones they were.
Before coming to this repo and having to dig through issues and commits to find out that you changed the way colors are handled I thought something was wrong with Sublime as it's impossible to see the diff colors in their low brightness way they are.

I tried changing the the settings first.
image

And these settings, but nothing is changing:
image

Absolutely unreadable:
image

@LouDnl
Copy link

LouDnl commented Mar 2, 2024

Took me a while, but I figured it out. Might be a good idea to give an example in the README. Here's mine:

// Documentation at https://www.sublimetext.com/docs/color_schemes.html
{
	"variables":
	{

	},
	"globals":
	{

	},
	"rules":
	[
        {
            "scope": "diff.deleted.sbs-compare",
            "background": "hsla(360, 60%, 60%, 0.55)",
            "foreground_adjust": "l(+ 5%)"
        },
        {
            "scope": "diff.deleted.char.sbs-compare",
            "background": "hsla(360, 80%, 60%, 0.90)",
            "foreground_adjust": "l(+ 10%)"
        },
        {
            "scope": "diff.inserted.sbs-compare",
            "background": "hsla(180, 60%, 60%, 0.35)",
            "foreground_adjust": "l(+ 5%)"
        },
        {
            "scope": "diff.inserted.char.sbs-compare",
            "background": "hsla(180, 45%, 60%, 0.70)",
            "foreground_adjust": "l(+ 10%)"
        }
	]
}

@kaste
Copy link
Owner

kaste commented Mar 3, 2024

I have these defaults in my scheme:

image

which is not as bright as before but totally readable and okay.

But ... by using standard selector mechanics you were able to define an alpha channel and foreground_adjust. That should give you more flexibility on the look than before. 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants