Re: dark theme
andrew strain <[email protected]> Wed, 3 May 2023 17:12:43 -0700 (PDT)
| Newsgroups | gmane.editors.scite.general |
|---|---|
| Message-ID | <[email protected]> |
> Stick it on SciTEBase A bit bamboozled here by cpp's structure. I have `bool invertBrightness` declared in SciTEBase.h and set to false in SciTEBasec.cpp and in SciTEProps.cxx it is set and compiles fine in void SciTEBase::SetPropertiesInitial. But I am trying to patch the transform into the methods in StyleDefinition.cxx SA::Colour ColourFromString( and the RGBA version of that function. But 'invertBrightness' was not declared in this scope. If I can get the formulas running then I should be able to calibrate them to work reasonably well, I can use a longer version if its required to work on the perl syntax and tricky cases. I have used it alot to switch between daylight and after hours mood. I do not see anywhere else to put the transformation than those string conversion functions in StyleDefinition, perhaps it could go somewhere into Scintilla itself ? Andrew On Thursday, 4 May 2023 at 00:04:59 UTC+1 Neil Hodgson wrote: > Andrew Strain: > > > I am trying to work out a patch for the dark mode feature but am stuck > on correctly scoping > > a kind of global variable named `bool invertBrightness` so that it can > be set when properties are in > > Stick it on SciTEBase which is unfortunately huge as it is easy to access > everywhere. > > > I find it works nicely while being so short, a 'flaw' is that the result > is less saturated than the original, however less saturation might even be > aesthetic when lit on a dark background. > > It's difficult to invert light consistently: colours near to white/black > are commonly difficult and SciTE uses them a fair bit. For example, check > Perl examples (like lexilla/test/examples/perl/perl-test-sub-prototypes.pl) > to see how pastel background colours look. Its likely gamma curve related > but may need special cases light colours. > > Neil > > -- You received this message because you are subscribed to the Google Groups "scite-interest" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/scite-interest/8e7be9e5-fdbd-4cd9-a0e6-430b04513bd4n%40googlegroups.com.